HOWTO: Ruby on Rails on FC3

lusid

Verified User
Joined
Jul 8, 2005
Messages
5
Location
Miramar, FL
Hey everyone,

This is a quick howto for installing Ruby on Rails on a Fedora Core 3 system running DirectAdmin. These are the steps I have taken, and it works beautifully for what I need. Now that I have it working, I believe my next goal is to create a nice Ruby on Rails plugin for DA (because Ruby on Rails is the shizat). Anyways, after DA does their install, this is all you have to do to get Rails up and going:

$ sudo yum install ruby ruby-devel rdoc irb
(Note: Say yes to any dependencies that may come up.)

Next, download, uncompress, and install the latest tarball for RubyGems from this page: http://rubyforge.org/frs/?group_id=126

$ cd /usr/local/src
$ wget http://rubyforge.org/frs/download.php/3700/rubygems-0.8.10.tgz
$ tar zxvf rubygems-0.8.10
$ cd rubygems-0.8.10
$ ruby setup.rb

Next, use RubyGems to pull down the latest rails.

$ sudo gem install rails
(Note: Say yes to any dependencies that may come up.)

Now you have everything you need to make Ruby on Rails work for a domain. For this example, I'm going to use a domain under the admin account called example.com.

$ su admin
$ cd /home/admin/domains/example.com
$ rails rails_app
$ mv public_html old_public_html
$ ln -s rails_app/public public_html

Now here's the most important part. SuExec doesn't like that rails creates the public directory with chmod 775, so we need to set it to chmod 755.

$ cd rails_app
$ chmod 755 public

And you're done! Now going to example.com will take you to the Rails congratulations page. Now all you need to do is remove the index.html file, create your controllers/models, configure your routes, configure your database file, and you're off! (this whole last paragraph is standard Ruby on Rails stuff, and goes beyond the scope of this howto).

Please let me know if this has helped you! :D RoR forever baby!
 
Thanks, thats just what I am looking for! Anyone else tried Ruby? Also how to you do the config on a mass scale?
 
did you install fast_cgi or anything?

and where are you at with the DA plugin?

if you need any help send me a PM i would be interested in coding this as well.

Van
 
Vandal, I take it you mean "free as in beer"?

All open source has to mean is "free as in speech".

You can certainly sell an open-sourceproject.

Jeff
 
This is _not_ a project that was completed in a day... this has taken several weeks of trials... it's doubtful that'll it'll be released "free".

Free beer? Comon up, I'll share :)
 
"Free as in Beer" means, in the open source community, that it's distributed at no charge.

"Free as in Spech" means that you get the sourcecode and can do what you want with it.

Various open source licenses have different requirements.

Jeff
 
it's a programming language, suppose to be very fast to code in because it does a lot of the crud work and you don't repeat yourself with your code.

:)
 
Example...

http://www.talkcss.net is a ruby on rails site on one of my DA servers. (please don't tell me it's got bugs..not my app, just used it for testing to verify things worked..lol).

Drawback to Ruby is that while it's faster to code due to it's OO structure and that it handles a lot of the tedious backend crap, it is also slower...though installing fastcgi will help dramtically..but I"m still looking at that...mod_fastcgi is needed and that requires a recompile of apache...so I'm little nervous on that point..:)
 
jlasman said:
It seems to write pretty good looking transitional code.

Jeff

The user has total control over the output codes look. You create views (templates) that are filled in with values, etc.
 
I have a few users looking for RoR , can I check after installation, is there any complicated configuration that need to be done on the system? Or is it like perl, just configure and let the users start their work?
 
Hello
Im learning ruby since a fiew days, and would like the add to a DA server.

I tried that tutorial.

I meet this probelem : on a fedora core 2, yum gets ruby 1.8.1.x, and not ok for the latest rails. (asks for 1.8.2 at least).

How do whe ask for a version of rails beside the last one ?

Thx for any help and RoR power indeed :)

Sky
 
Well, after havig a hard time, here what you shoud not do :

install ruby 1.8.3 :) (at this date)

So, i did this, and all wrks fine :

- download and install ruby 1.8.2 (stable version) => configure, make, make install

- then follow the same instruction as on the first post of this thread.



edit : this is for a fedora core 2 ... i dont now if it is the same with another core.
Sky
 
Back
Top