Rails issue when using Rails 2.3.2 and Ruby 1.9.1

a) What’s does the following commands generate?

ruby -v

gem -v

b) Did you try to install Rails using the following?

sudo gem install rails

-Conrad

Conrad Taylor wrote:

/Users/douglilla/.gem/ruby/1.9.1/gems/rails-2.3.2/lib/rails_generator/options.rb:32:in from `require'

Any suggestions would be greatly appreciated.

Thanks,

DL

a) What's does the following commands generate?

    ruby -v     gem -v

b) Did you try to install Rails using the following?

     sudo gem install rails

-Conrad

Conrad,

a)

Doug-Lillas-Computer:~ douglilla$ ruby -v ruby 1.9.1p129 (2009-05-12 revision 23412) [powerpc-darwin9.6.0] Doug-Lillas-Computer:~ douglilla$ gem -v 1.3.4 Doug-Lillas-Computer:~ douglilla$

b)

Yes I installed with sudo gem rails

DL

If that’s the case, why are your error messages referencing files in

/Users/douglilla/.gem

instead

<parent_directory_of_gem_repository>/gem

Usually, this happens when you do not perform the installation of gems

as root and the gem executable will use ${HOME}/.gem as the fallback.

OK, what’s does the following produce?

gem environment

-Conrad

Conrad Taylor wrote:

>> > gem -v

If that's the case, why are your error messages referencing files in

/Users/douglilla/.gem

instead

<parent_directory_of_gem_repository>/gem

Usually, this happens when you do not perform the installation of gems as root and the gem executable will use ${HOME}/.gem as the fallback. OK, what's does the following produce?

gem environment

-Conrad

Here's what the command gem environment lists:

Doug-Lillas-Computer:~ douglilla$ gem environment RubyGems Environment:   - RUBYGEMS VERSION: 1.3.4   - RUBY VERSION: 1.9.1 (2009-05-12 patchlevel 129) [powerpc-darwin9.6.0]   - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1   - RUBYGEMS PREFIX: /usr/local/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.4   - RUBY EXECUTABLE: /usr/local/bin/ruby   - EXECUTABLE DIRECTORY: /usr/local/bin   - RUBYGEMS PLATFORMS:     - ruby     - powerpc-darwin-9   - GEM PATHS:      - /usr/local/lib/ruby/gems/1.9.1      - /Users/douglilla/.gem/ruby/1.9.1   - GEM CONFIGURATION:      - :update_sources => true      - :verbose => true      - :benchmark => false      - :backtrace => false      - :bulk_threshold => 1000      - :sources => ["RubyGems.org | your community gem host, "http://gems.github.com/&quot;\]   - REMOTE SOURCES:      - http://gems.rubyforge.org/      - http://gems.github.com/

I guess I will need to reinstall? My set-up was working fine until I upgraded. Thanks for your help!

DL

Conrad Taylor wrote:

gem -v

If that’s the case, why are your error messages referencing files in

/Users/douglilla/.gem

instead

<parent_directory_of_gem_repository>/gem

Usually, this happens when you do not perform the installation of gems

as root and the gem executable will use ${HOME}/.gem as the fallback.

OK, what’s does the following produce?

gem environment

-Conrad

Here’s what the command gem environment lists:

Doug-Lillas-Computer:~ douglilla$ gem environment

RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.4

  • RUBY VERSION: 1.9.1 (2009-05-12 patchlevel 129)

[powerpc-darwin9.6.0]

  • INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1

  • RUBYGEMS PREFIX:

/usr/local/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.4

  • RUBY EXECUTABLE: /usr/local/bin/ruby

  • EXECUTABLE DIRECTORY: /usr/local/bin

  • RUBYGEMS PLATFORMS:

    • ruby

    • powerpc-darwin-9

  • GEM PATHS:

    • /usr/local/lib/ruby/gems/1.9.1

    • /Users/douglilla/.gem/ruby/1.9.1

  • GEM CONFIGURATION:

    • :update_sources => true

    • :verbose => true

    • :benchmark => false

    • :backtrace => false

    • :bulk_threshold => 1000

    • :sources => [“http://gems.rubyforge.org/”,

http://gems.github.com/”]

I guess I will need to reinstall? My set-up was working fine until I

upgraded. Thanks for your help!

DL

DL, please try doing the following:

rm -rfi ${HOME}/.gem

-Conrad

Conrad Taylor wrote:

> If that's the case, why are your error messages referencing files in > - RUBY VERSION: 1.9.1 (2009-05-12 patchlevel 129)     - /usr/local/lib/ruby/gems/1.9.1     - http://gems.rubyforge.org/     - http://gems.github.com/

I guess I will need to reinstall? My set-up was working fine until I upgraded. Thanks for your help!

DL

DL, please try doing the following:

rm -rfi ${HOME}/.gem

-Conrad

Conrad,

I used the command you suggested, ended up deleting some 1.8 files and then came up with this:

Doug-Lillas-Computer:~ douglilla$ rm -rfi ${HOME}/.gem examine files in directory /Users/douglilla/.gem? yes examine files in directory /Users/douglilla/.gem/ruby? yes examine files in directory /Users/douglilla/.gem/ruby/1.8? yes examine files in directory /Users/douglilla/.gem/ruby/1.8/cache? yes remove /Users/douglilla/.gem/ruby/1.8/cache/actionmailer-2.3.2.gem? no remove /Users/douglilla/.gem/ruby/1.8/cache/actionpack-2.3.2.gem? no remove /Users/douglilla/.gem/ruby/1.8/cache/activerecord-2.3.2.gem? no remove /Users/douglilla/.gem/ruby/1.8/cache/activeresource-2.3.2.gem? no remove /Users/douglilla/.gem/ruby/1.8/cache/activesupport-2.3.2.gem? no remove /Users/douglilla/.gem/ruby/1.8/cache/builder-2.1.2.gem? no

Apparently a lot of gems got installed in the wrong directory??

Thanks,

DL

DL, all you gems should be installed in the following:

For Ruby 1.9.1 gems: /usr/local/lib/ruby/gems/1.9.1

For Ruby 1.8 gems: /usr/local/lib/ruby/gems/1.8

Thus, you shouldn’t be installing your gems ${HOME}/.gems because this isn’t the

correct place for them if you’re using sudo.

Good luck,

-Conrad