Topic: How to install Rails Framework on Fedora Linux?

Hey anyone here to help me out to install Rails on Fedora...

Thanks in advance smile

Re: How to install Rails Framework on Fedora Linux?

which version of fedora o you have ?

most of the time ruby is already installed (half way there already)

bring up a terminal and type


ruby -v

if you have a version greater than 1.8.2, then you want to get the latest version of ruby gems

wget http://rubyforge.org/frs/download.php/1 … -0.9.0.tgz

then unzip the file and change into the unzipped directory

gunzip ruby-gems-0.9.0.tgz
tar -xvf ruby-gems-0.9.0.tar
cd ruby-gems-0.9.0

then you want to start installing the gems, become root first

su
<enter  password>
ruby setup.rb

then install rails
 gem install rails --include-dependencies

once that is done you should have rails installed, to check make a quick project
rails demo
cd demo
script/server

then loadup your browser and got to http://localhost:3000

rails should be up and running smile

oh you might have a problem with irb not being installed. when you click on "about your installation environment" and you get nothing, have a look in the logs. if

ERROR MissingSourceFile: no such file to load -- irb

is there, this needs to be installed
su
<enter password>
yum install irb

then everything should be fine

Last edited by leunix (2006-11-11 08:59:09)

Re: How to install Rails Framework on Fedora Linux?

leunix,

After installing Rails on my Fedora Core 5 and creating a simple say/hello application from "Agile Web Development" book, I get an error when trying to access it: `/say/hello' not found.

Output from WEBrick:

#<ArgumentError: Anonymous modules have no name to be referenced by>
["/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:404:in `to_constant_name'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:214:in `qualified_name_for'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:476:in `const_missing'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/dispatcher.rb:117:in `reset_after_dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/dispatcher.rb:51:in `dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/webrick_server.rb:113:in `handle_dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/webrick_server.rb:79:in `service'", "/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'", "/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'", "/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'", "/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'", "/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'", "/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/webrick_server.rb:63:in `dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/commands/servers/webrick.rb:59", "/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'", "/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:495:in `require'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:342:in `new_constants_in'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:495:in `require'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/commands/server.rb:39", "/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'", "/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'", "script/server:3"]
[2007-02-23 18:32:37] ERROR `/say/hello' not found.
127.0.0.1 - - [23/Feb/2007:18:32:37 EST] "GET /say/hello HTTP/1.1" 404 279
- -> /say/hello

Re: How to install Rails Framework on Fedora Linux?

If you are using Fedora Core 6, installation is usually very easy.
I have a quick walkthrough on my blog here:

Fedora Core 6 and Ruby Rails
Please digg it if you find it useful, comments welcome and appreciated.