PDA

View Full Version : installing rails



JoeP
03-03-2006, 03:47 PM
Has anyone done it successfully on Bluehost?
I called support and was told that Bluehost support of Ruby on Rails consists of supporting the Ruby language (version 1.8.4). It was suggested to just follow the directions (sans install of Ruby) on the http://www.rubyonrails.org/ site. This consists of downloading and extracting ruby gems then run "ruby setup.rb".


Is that it?
Does it matter where I put RubyGems?
How do you "run" ruby setup.rb? Is it like running myfile.php which can be done from a browser?

If I follow this procedure will it mess up any other part of my site?

What about these instructions?

rails path/to/your/new/application
cd path/to/your/new/application
ruby script/server

You're running Ruby on Rails! Follow the instructions on http://0.0.0.0:3000.

Thanks and sorry for being such an ignorant newbie on this subject!

joe

bonz
03-03-2006, 08:56 PM
JoeP. Yes, basic ruby on rails support is available on BH.

The procedure you describe will work just fine, and since the webbrick server runs on port 3000 it won't interfere with your standard server.

I typically create a rails directory in my home directory to store my apps,

mkdir ~/rails
cd ~/rails
rails yourapp

You don't want to do this in your public_html directory.

You can, however, access your rails app through your apache server by doing something like this:

rails yourapp
ln -s /home/username/yourapp/public ~/public_html/yourapp

And then access http://yourdomain.com/yourapp/

Dig around the forum here for a few recent and lengthy threads on RoR support where you might find something useful.

JoeP
03-06-2006, 06:37 AM
JoeP. Yes, basic ruby on rails support is available on BH.

The procedure you describe will work just fine, and since the webbrick server runs on port 3000 it won't interfere with your standard server.

I typically create a rails directory in my home directory to store my apps,

mkdir ~/rails
cd ~/rails
rails yourapp

You don't want to do this in your public_html directory.

You can, however, access your rails app through your apache server by doing something like this:

rails yourapp
ln -s /home/username/yourapp/public ~/public_html/yourapp

And then access http://yourdomain.com/yourapp/

Dig around the forum here for a few recent and lengthy threads on RoR support where you might find something useful.

Flaunting my ignorance here... yet again :-(

I could see doing this on my home machine, but how exactly do you issue those commands for the bluehost account? I do not see any sort of command line interface to the bluehost server. Is there a way to do it through cpanel?

Thanks,
joe

mja1973
03-06-2006, 02:40 PM
Hey Joe,

I'm in the same boat as you, stumbling around trying to learn as I go.

To run the commands on BlueHost, you need to fax them a copy of your drivers license (or email then a scanned image), and request that they activate SSH/Shell Scripting for your account.

Once they activate it, you'll see SSH in your control panel, and you'll be able to use their java plug in to run command lines on their server.

sean
03-06-2006, 07:49 PM
I appreciate that information. I just recently bought the pragmatic programmer's Learn to Program book. It's all about learning to program with Ruby. Stuff is making sense, but I eventually wanted to try stuff on my BH account. Currently, I used the directions on this page:
http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger
which allowed me to set up my Mac G5 as a server for testing things. I have my work cut out for me just to figure this part out, but if I can get something working, it's nice to know that I have the first step towards shifting what I get working here to my BH account. Thanks again.

piku
03-06-2006, 09:52 PM
@bonz: from your experience with BH, were you able to have a Rails app run on port:80. I'd just like to know this for future reference. Just wondering if we can run a finalized app for live-production in the future. Pretty much part of the trial-process here that I'm going through.

Please reply at your earliest convenience. TIA




JoeP. Yes, basic ruby on rails support is available on BH.

The procedure you describe will work just fine, and since the webbrick server runs on port 3000 it won't interfere with your standard server.

I typically create a rails directory in my home directory to store my apps,

mkdir ~/rails
cd ~/rails
rails yourapp

You don't want to do this in your public_html directory.

You can, however, access your rails app through your apache server by doing something like this:

rails yourapp
ln -s /home/username/yourapp/public ~/public_html/yourapp

And then access http://yourdomain.com/yourapp/

Dig around the forum here for a few recent and lengthy threads on RoR support where you might find something useful.

bonz
03-07-2006, 03:43 AM
Piku, yes.

My Typo blog (RoR app) is running on BlueHost (FastCGI on apache, not webrick), and describes some of the stuff I went through to get it going.

http://www.jangy.com/blog/

Mysql should be a non-issue now as Rando has installed the ruby gem on the servers.

FastCGI is still an issue, but from what Rando says, this should not be permanent. When he resolves that, things should be pretty easy and the hoops I jumped through unnecessary.

mja1973
03-08-2006, 05:54 AM
Im trying to instal Typo and get it running under an addon domain.

I'm having two different problems. One is that I keep having to specify /public/ in the url to get it to even try to load typo.

The other is a 500 error 'typo could not be loaded'.

Typo runs great in my local environment.

I ran the fast cgi commands you listed in your blog to try and get fastcgi installed under my account. I must admit that I'm feeling a bit like a fish out of water with all these shell commands. ;) But at the same time, it's new and different for me... which keeps it exciting.

I'm going to remove all the files from my account tonight and start over, as I probably goofed something up.

Here's my question... how can I get more info on what the error is? It could be a lot of things. Maybe fastcgi didnt install correctly (is there a way to test this?) or maybe there was an error in my database configuration file, or maybe I should have changed something in the .htaccess file. *shrug * I'm not real sure how to get to the actual error to find out.

timberford
03-08-2006, 06:05 AM
One is that I keep having to specify /public/ in the url to get it to even try to load typo.

this the problem i am having see my thread... http://www.bluehostforum.com/showthread.php?t=311

richard
04-01-2006, 09:20 AM
You can, however, access your rails app through your apache server by doing something like this:

rails yourapp
ln -s /home/username/yourapp/public ~/public_html/yourapp

And then access http://yourdomain.com/yourapp/

Fine. I even see the "Welcome aboard" page. There is one functional link on that page. It doesn't work. When I click "About your application’s environment", I get an error (Routing Error/Recognition failed for "/rails_info/properties").

Why?

ben_brown30
04-02-2006, 04:52 AM
I'm not sure why you get this error - I haven't been able to work this out yet.

But it does not have any impact on Rails working correctly.

I had one thought that the problem could be linked with accessing the Rails application through a subdomain - just out of interest is your accessed like this?

richard
04-03-2006, 11:05 AM
I'm not sure why you get this error - I haven't been able to work this out yet.

But it does not have any impact on Rails working correctly.

I had one thought that the problem could be linked with accessing the Rails application through a subdomain - just out of interest is your accessed like this?

Have you seen this error before? You are a bit ambiguous on that score.

I'm befuddled by your second sentence. Rails's simple test page fails. I call that "impact on Rails working correctly".

I'm not sure what you mean by accessing through a subdomain. I tried it initially using a parked domain name. I then tried using the main domain name, and it fails identically. To be precise: "http://www.mydomain.com/app/".

Thanks for your help. This is very discouraging.

timberford
04-03-2006, 12:27 PM
i have a post on my site about how i got ruby on rails running on bluehost. it may help you out...

http://www.paulsturgess.co.uk/articles/show/8

ben_brown30
04-04-2006, 01:41 AM
I have seen the error message before on my rails app I am currently building.

What I meant by "impact on Rails working correctly" is that I have continued to create an application which has worked fully - even though I get that error message.

A subdomain is http://www.app.mydomain.com which is how I currently access my application. You access yours but not DIRECTLY through the domain name i.e. you add /app to the end. I still wonder if not accessing directly through www.mydomain.com will solve the problem or not - however as I said, its incidental really as if you continue to build your application it should work fine.

timberford's link is exactly what I did - even though I still got the error message