RubyGems 1.3, Ruby 1.9.1-p0

I am newbie to RoR and trying to install on CentOS. Installing of Ruby from ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.gz and that went smoothly.

% ruby -v ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]

Then trying installing rubygems from http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz. Running "ruby setup.rb" was a total disaster. The last message the installation prints out is "RubyGems installed the following executables: /usr/local/bin/ruby," and doing

% ruby -v /usr/local/bin/ruby: line 8: require: command not found /usr/local/bin/ruby: line 9: require: command not found /usr/local/bin/ruby: line 10: require: command not found /usr/local/bin/ruby: line 12: required_version: command not found /usr/local/bin/ruby: line 14: unless: command not found /usr/local/bin/ruby: line 15: abort: command not found /usr/local/bin/ruby: line 16: end: command not found /usr/local/bin/ruby: line 21: syntax error near unexpected token `(' /usr/local/bin/ruby: line 21: `args = !ARGV.include?("--") ? ARGV.clone : ARGV[0...ARGV.index("--")]'

I can get ruby back by reinstalling it ... then I attempted "gem install rails" which seems to have succeeded to my surprise.

% gem update rails Updating installed gems Nothing to update

Then the following happens:

% cd %demo_app% % ruby script/server /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require': no such file to load -- test/unit/error (MissingSourceFile)         from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `block in require'         from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in'         from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require'         from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/lib/active_support/deprecation.rb:224:in `<top (required)>'         from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require'         from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `block in require'         from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in'         from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require'         from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/lib/active_support.rb:37:in `<top (required)>'         from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/commands/server.rb:1:in `require'         from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/commands/server.rb:1:in `<top (required)>'         from script/server:3:in `require'         from script/server:3:in `<main>'

Now what am I to do?

Thanks in advance.

I run RoR on CentOS 5.2, but I recommend dropping back to ruby 1.8.7, and rails 2.2.2 or even 2.1.1

I use postgressql 8.3.5, but I had to add the postgres repository to get it.

I also use apache and passenger with no problems.

Cheers–

Charles

I am newbie to RoR and trying to install on CentOS. Installing of Ruby from ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.gz and
that went smoothly.

% ruby -v ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]

ruby 1.9 bundles rubygems. You probably overwrote the version of
rubygems that is part of ruby itself. ruby 2.2.2 isn't ready for ruby 1.9 (rails 2.3 should be)

Fred

Frederick Cheung wrote:

ruby 1.9 bundles rubygems. You probably overwrote the version of rubygems that is part of ruby itself. ruby 2.2.2 isn't ready for ruby 1.9 (rails 2.3 should be)

Fred

Thanks Fred.

I attempted to install 2.3 without much success:

% gem install rails --source http://gems.rubyonrails.org ERROR: Error installing rails:         actionpack requires rack (>= 0.9.0, runtime) Updating class cache with 2269 classes...

I installed ruby 1.8.7 and that worked for me.

Thanks

Frederick Cheung wrote:

ruby 1.9 bundles rubygems. You probably overwrote the version of rubygems that is part of ruby itself. ruby 2.2.2 isn't ready for ruby 1.9 (rails 2.3 should be)

Fred

Thanks Fred.

I attempted to install 2.3 without much success:

Did you install rack ?

Fred

What database are you using?

There is a great deal of information about apache deployments with mongrel and capistrano. Google is your friend there. I use apache and the passenger gem. Works well for me. Google will help you there, too. If you haven’t visited the “peepcode” (just google) site, you will find a lot of help, too.

Cheers–

Charles