Go Back   HostGator Peer Support Forums > HostGator Announcements > General Announcements

Notices

Reply
 
Thread Tools
  #126  
Old 06-10-2008, 06:54 PM
aavellan aavellan is offline
Hatchling Croc
 
Join Date: Jun 2008
Posts: 1
Default Re: Ruby on Rails Support

I have spent much time reading the whole thread, but I remain with this problem. Host Gator should do a manual.
Alex
Reply With Quote
  #127  
Old 06-10-2008, 10:49 PM
gatoboi gatoboi is offline
Banned User
 
Join Date: Jun 2008
Posts: 7
Default Re: Ruby on Rails Support

a manual would be nice.
__________________
Reply With Quote
  #128  
Old 06-12-2008, 09:21 AM
utt-hp utt-hp is offline
Hatchling Croc
 
Join Date: Oct 2007
Posts: 1
Default Re: Ruby on Rails Support

Tried to follow the instructions on the first page but I'm getting this error:

[uttholl@gator236 ~]$ rails /home/uttholl/demoapp
/usr/bin/rails:17: undefined method `require_gem' for main:Object (NoMethodError)

Ideas Anyone? Have I missed to do anything first?
HELP!
Reply With Quote
  #129  
Old 06-16-2008, 06:25 PM
Vero Vero is offline
Hatchling Croc
 
Join Date: Jun 2008
Location: Cincinnati, OH
Posts: 6
Default Re: Ruby on Rails Support

I'm new to ROR. After closely reading the forum and asking tech support some questions, I got the demo app to work. It was much easier than I anticipated at first. Now, I have a small ROR app that I want to transfer from my local machine to the site. I started to ftp the files via cpanel. Is there a way to transfer over the entire app directory instead of recreating the directory tree and copying each ROR file? Thanks for the help.
Reply With Quote
  #130  
Old 06-16-2008, 06:28 PM
GvilleRick's Avatar
GvilleRick GvilleRick is offline
Emperor Croc
 
Join Date: Jan 2007
Location: Greenville, SC
Posts: 3,128
Default Re: Ruby on Rails Support

You can transfer a folder over using an FTP program. I use CoreFTP from coreFTP.com but any FTP program should work.
Reply With Quote
  #131  
Old 06-16-2008, 07:16 PM
Vero Vero is offline
Hatchling Croc
 
Join Date: Jun 2008
Location: Cincinnati, OH
Posts: 6
Default Re: Ruby on Rails Support

thanks GvilleRick--that worked perfectly--coreFTP was very easy
Reply With Quote
  #132  
Old 06-16-2008, 07:35 PM
GvilleRick's Avatar
GvilleRick GvilleRick is offline
Emperor Croc
 
Join Date: Jan 2007
Location: Greenville, SC
Posts: 3,128
Default Re: Ruby on Rails Support

Glad it worked for you. I really like CoreFTP and I have used a number of different programs over the years.
Reply With Quote
  #133  
Old 06-16-2008, 07:45 PM
brianevans brianevans is offline
Hatchling Croc
 
Join Date: Jun 2008
Posts: 6
Default Re: Ruby on Rails Support

I too have been having a lot of problems getting my apps configured and started and here are a few pointers/lessons I have learned along the way.

  1. Make sure you have a .htaccess file located in /demoapp/public/ that is like this: http://pastie.org/216238. (that is what caused the 404 error)
  2. Make sure your /public/ folder is set with 755 permissions - same as dispatch.cgi (that is what caused the "Rails application failed to start properly" error for me
  3. Make sure the following is at the top of your dispatch.cgi file:
    Quote:
    #!/usr/bin/ruby
    - this also cause the "Rails application failed to start properly" error when I uploaded an app from windows.
  4. Make sure your database.yml is configured properly
Other that updating rails and gems (had to get Hostgator support to do that) everything works fine - but still slow. I am working on switching to production mode to see if that makes it faster.

And you don't have to run script/server to make it work - that is only when you are working with a development copy on your local machine.
Reply With Quote
  #134  
Old 06-16-2008, 07:51 PM
brianevans brianevans is offline
Hatchling Croc
 
Join Date: Jun 2008
Posts: 6
Default Re: Ruby on Rails Support

Quote:
Originally Posted by Streamweaver View Post
Sorry, yet another question

When I try to restart my server to register controllers I never get back to the command prompt.
./script/server
Gives me the expected results on screen but I never get back to a command prompt.
You don't ever have to run script/server when using an app uploaded on hostgator - that is only when you are using it in development mode on your local machine. Andy you don't have to restart the server every time you make a change either.
Reply With Quote
  #135  
Old 06-16-2008, 08:11 PM
brianevans brianevans is offline
Hatchling Croc
 
Join Date: Jun 2008
Posts: 6
Default Re: Ruby on Rails Support

Has anyone had any luck getting ROR to run at a decent speed with Hostgator? I switched to production mode and it is still really slow.
Reply With Quote
  #136  
Old 06-16-2008, 08:46 PM
Vero Vero is offline
Hatchling Croc
 
Join Date: Jun 2008
Location: Cincinnati, OH
Posts: 6
Default Re: Ruby on Rails Support

I'm trying to deploy a ROR app onto HG. I've done the demo and it worked fine. I've uploaded my app and put it into a /public_html/rails_apps/. I've created a production database and want to now migrate to that data base. I tried to rake db:migrate from the SSH console in the application root but get the following error:

No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) /usr/libruby/gems/1.8/gems/rake-07.3/lib/rake.rb:1934:in 'raw_load_rakefile'

Any suggestions would be appreciated. Thanks.
Reply With Quote
  #137  
Old 06-16-2008, 08:49 PM
brianevans brianevans is offline
Hatchling Croc
 
Join Date: Jun 2008
Posts: 6
Default Re: Ruby on Rails Support

Quote:
Originally Posted by Vero View Post
I'm trying to deploy a ROR app onto HG. I've done the demo and it worked fine. I've uploaded my app and put it into a /public_html/rails_apps/. I've created a production database and want to now migrate to that data base. I tried to rake db:migrate from the SSH console in the application root but get the following error:

No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) /usr/libruby/gems/1.8/gems/rake-07.3/lib/rake.rb:1934:in 'raw_load_rakefile'

Any suggestions would be appreciated. Thanks.
try running this:

Quote:
ruby rake db:migrate
I am new too but not sure if that would work.
Reply With Quote
  #138  
Old 06-17-2008, 05:16 AM
ZenCocoon ZenCocoon is offline
Hatchling Croc
 
Join Date: May 2006
Posts: 12
Default Re: Ruby on Rails Support

Quote:
Originally Posted by brianevans View Post
Has anyone had any luck getting ROR to run at a decent speed with Hostgator? I switched to production mode and it is still really slow.
As far as I know hostgator runs ROR app with CGI, wish is really slow. For better performance you would need FCGI or even better Mongrel or Passenger / mod_rails, ...

Hope this help,
__________________
Sébastien Grosjean - ZenCocoon - www.zencocoon.com
http://www.villasthalassa.com -- Wonderful sea side villas to rent in Greece
http://www.lefkadalands.com -- Find the land of your dreams, on a Greek island
http://www.catamaranforent.com -- Rent an amazing 42 feet catamaran in Ionian islands, Greece
http://www.tiarehq.com -- Multilingual website builder, online publishing in minutes

Last edited by ZenCocoon; 06-17-2008 at 05:24 AM.
Reply With Quote
  #139  
Old 06-20-2008, 08:49 PM
Vero Vero is offline
Hatchling Croc
 
Join Date: Jun 2008
Location: Cincinnati, OH
Posts: 6
Default Re: Ruby on Rails Support

I am trying to deploy an application from my local machine to HG. Its the shovell app from Lenz's Sitepoint's book. I'm having trouble establishing a symbolic link to my app. Here's what I've done:

cd ../public_html
ln -s ../rails_apps/shovell/shovell shove

Cpanel tells me I have a broken symbolic link. Any suggestions?

Also, since, I'm a newbie I don't mind asking the stupid questions. I am still having trouble performing a rake db:migrate from the SSH console. I have to admit, I don't really understand where I am when I get to the SSH console. Is the SSH console just a regular command window? And how do I get to a ruby or rails console from the prompt.

Thanks.
Reply With Quote
  #140  
Old 06-20-2008, 08:56 PM
brianevans brianevans is offline
Hatchling Croc
 
Join Date: Jun 2008
Posts: 6
Default Re: Ruby on Rails Support

Vero,

I will have to let someone else answer the symbolic link question because that is something I am not familiar with myself. Might want to email the support people and have them look at it.

As for the SSH, you need to make sure that you are in the "Shovel" app folder when you run your commands. So, if your app is called "shoveapp", you need to make sure you are in the /shovelapp/ folder before you run the ruby and rails commands. Also, try running "ruby rake db:migrate". Sometimes you have to add the ruby command.

I too am new at ROR - but starting to like it - a lot!

BTW - SSH is just like the regular command window - just a remote version of it.
Reply With Quote
  #141  
Old 06-21-2008, 09:59 AM
Vero Vero is offline
Hatchling Croc
 
Join Date: Jun 2008
Location: Cincinnati, OH
Posts: 6
Default Re: Ruby on Rails Support

brianevans,
Thanks. I will try that. I too like ROR. For me I chose it because it seems to have the complete package--from the client/server side of things. It seems that other options might deploy easier, but once that issue is resolved, the creation of applications seems easier under ROR. Thanks for the help.
Reply With Quote
  #142  
Old 06-21-2008, 03:00 PM
Vero Vero is offline
Hatchling Croc
 
Join Date: Jun 2008
Location: Cincinnati, OH
Posts: 6
Default Re: Ruby on Rails Support

Hello. In addition to my first question, I was in my app directory via SSH and issued the following command:

rake db:migrate

I received a notice to Please 'gem update --system and try again. I did that and received the following error:
Bulk updating GEM source index for http://gemsrubyforge.org
/user/lib/ruby/1.8/yaml.rb:133 :[BUG] Segmentation fault
ruby 1.8.5 (2006-08-25) [i-386-linux]
Aborted (core dumped)

What's going on here? Also, after running a rails -v and ruby -v commands, I determined that I'm running Rails 1.2.3 and ruby 1.8.5, which is different than what the webiste forum indicates is running.

I issued a service ticket for both questions, but thought it might be more efficient to post them on the forum.

Any help would be appreciated.
Reply With Quote
  #143  
Old 06-21-2008, 08:22 PM
commando commando is offline
Hatchling Croc
 
Join Date: Jun 2007
Posts: 10
Default Re: Ruby on Rails Support

Vero, try asking your question on www.railsforum.com
Reply With Quote
  #144  
Old 08-23-2008, 01:32 PM
GatorDavid's Avatar
GatorDavid GatorDavid is offline
HostGator Staff
 
Join Date: May 2007
Posts: 1,825
Default Re: Ruby on Rails Support

Good afternoon guys,

If anyone is getting errors like the following,

/usr/bin/rails:17: undefined method `require_gem' for main:Object (NoMethodError)

when running rails, please submit a support ticket so we can get it corrected for you. Thanks!
Reply With Quote
  #145  
Old 08-25-2008, 05:56 AM
jflcooper jflcooper is offline
Hatchling Croc
 
Join Date: Aug 2008
Posts: 3
Default Re: Ruby on Rails Support

Is rails version 2.1.0 going to be installed? or does anyone know away around this?
Reply With Quote
  #146  
Old 08-26-2008, 02:45 AM
jflcooper jflcooper is offline
Hatchling Croc
 
Join Date: Aug 2008
Posts: 3
Default Re: Ruby on Rails Support

ok i am getting a HTTP 500 internal server error does anyone have a solution to what this could possibly be?
Reply With Quote
  #147  
Old 08-26-2008, 04:55 AM
jflcooper jflcooper is offline
Hatchling Croc
 
Join Date: Aug 2008
Posts: 3
Default Re: Ruby on Rails Support

OK to answer both my previous questions...
If you are using rails 2.1.0 and want it to work with your shared host account and they are only using 2.0.2 then do a gem freeze

>rake rails:freeze:gems VERSION=2.1.0

Make sure to do this on your local machine then upload the app and follow the other procedures... everything seems to be working like a charm.

and also something silly the HTTP 500 internal error was something simple... checked the error log in the CP (control Panel) and noticed that the dispatch.cgi did not have the correct permissions... check them.. change them and your on your way.

Also note to the support team, do a better job and also get fcgi as the apps are running pretty slow and from what i have read and research fcgi will help everyone alot.

Cheers
Coops
Reply With Quote
  #148  
Old 09-13-2008, 03:04 PM
katmann katmann is offline
Hatchling Croc
 
Join Date: Apr 2008
Posts: 2
Default Re: Ruby on Rails Support

Does Host Gator plan to start offering FCGI? The performance of my website would be significantly improved if I could switch to FCGI.

Overall, I have been very happy with the support of Ruby on Rails from Host Gator. This is the only complaint I really have.

Thanks
Reply With Quote
  #149  
Old 09-23-2008, 10:29 PM
vvlist vvlist is offline
Hatchling Croc
 
Join Date: Sep 2008
Posts: 3
Question Re: Ruby on Rails Support

Hello, I am new to HostGator and moderately new to rails (I've built a few simple sites). I have my site up and running with the help of this very thread. (Thanks everyone) My question pertains to routing (I think). I used the suggestions in this thread to get www.mysite.com/rails/ to open correctly with www.mysite.com/ instead. That works wonderfully. But as soon as I click on a link that goes to another page on the site the www.mysite.com/rails/whatever appears. Each of the links in my view are coded like <%= link_to "Contact", :controller => "site", :action => "contact" %>
My site is very simple. There is an index which I want to the root of the site, a contact page, which I want to be www.mysite.com/contact/ and so on. So how do I get the "in site" linking to jump to www.mysite.com/contact/ instead of www.mysite.com/rails/contact/?

My routes.rb:
Code:
ActionController::Routing::Routes.draw do |map|
  map.site ':action', :controller => "site" 
  map.root :controller => "site"
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
end
My .htaccess file in /public_html/ :
Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/cpanel/.*
RewriteCond  %{HTTP_HOST}  ^www\.mysite\.com [OR]
RewriteCond  %{HTTP_HOST}  ^mysite\.com
RewriteRule ^(.*)$ /rails/$1 [L,QSA]
I have read this entire thread twice over, and googled about .htaccess and the rewriteengine. But I'm not sure what to do. But I do think it has to do with either my routes.rb or my .htaccess file. Does anyone care to take a stab or point me in the right direction? Surely someone else has faced this issue.
Reply With Quote
  #150  
Old 09-24-2008, 06:51 PM
vvlist vvlist is offline
Hatchling Croc
 
Join Date: Sep 2008
Posts: 3
Default Re: Ruby on Rails Support

Quote:
Originally Posted by vvlist View Post
Hello, I am new to HostGator and moderately new to rails (I've built a few simple sites). I have my site up and running with the help of this very thread. (Thanks everyone) My question pertains to routing (I think). I used the suggestions in this thread to get www.mysite.com/rails/ to open correctly with www.mysite.com/ instead. That works wonderfully. But as soon as I click on a link that goes to another page on the site the www.mysite.com/rails/whatever appears. Each of the links in my view are coded like <%= link_to "Contact", :controller => "site", :action => "contact" %>
My site is very simple. There is an index which I want to the root of the site, a contact page, which I want to be www.mysite.com/contact/ and so on. So how do I get the "in site" linking to jump to www.mysite.com/contact/ instead of www.mysite.com/rails/contact/?

My routes.rb:
Code:
ActionController::Routing::Routes.draw do |map|
  map.site ':action', :controller => "site" 
  map.root :controller => "site"
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
end
My .htaccess file in /public_html/ :
Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/cpanel/.*
RewriteCond  %{HTTP_HOST}  ^www\.mysite\.com [OR]
RewriteCond  %{HTTP_HOST}  ^mysite\.com
RewriteRule ^(.*)$ /rails/$1 [L,QSA]
I have read this entire thread twice over, and googled about .htaccess and the rewriteengine. But I'm not sure what to do. But I do think it has to do with either my routes.rb or my .htaccess file. Does anyone care to take a stab or point me in the right direction? Surely someone else has faced this issue.
So after some reading about routes, I added some named routes to my routes.rb, and as a result I can get www.mysite.com/contact instead of www.mysite.com/rails/contact to show up in the browser if I manually type them in. But I still can't get it to link to other pages like www.mysite.com/contact using <%= link_to "Contact", contact_path %> (contact_path being the method the named route created) the contact_path method prints out /rails/contact.

I realize I could just hardcode a http://www.mysite.com/contact link in there, but I want to make my code as clean as possible in my view and use the rails' way of doing things.

I remember when I set my rails app up initially, the directions at the beginning of this thread called for a
Code:
ln -s ../demoapp/public rails
This created the rails symlink. Is the extra "rails" in my URL that symlink? If so, can I use my .htaccess file to eliminate it?
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 04:09 AM.