Rails issue when using Rails 2.3.2 and Ruby 1.9.1

Hello,

I’m having a problem with Rails since updating to Rails 2.3.2 and Ruby
1.9.1 on PPC MAC 10.5.6.
I installed twice,but still get the same error when trying to create a
new Rails app:

/Users/douglilla/.gem/ruby/1.9.1/gems/rails-2.3.2/lib/rails_generator/options.rb:32:in
default_options': undefined methodwrite_inheritable_attribute’ for
Rails::Generator::Base:Class (NoMethodError)
from
/Users/douglilla/.gem/ruby/1.9.1/gems/rails-2.3.2/lib/rails_generator/base.rb:90:in
<class:Base>' from /Users/douglilla/.gem/ruby/1.9.1/gems/rails-2.3.2/lib/rails_generator/base.rb:85:inmodule:Generator
from
/Users/douglilla/.gem/ruby/1.9.1/gems/rails-2.3.2/lib/rails_generator/base.rb:48:in
<module:Rails>' from /Users/douglilla/.gem/ruby/1.9.1/gems/rails-2.3.2/lib/rails_generator/base.rb:6:in<top (required)>’
from
/Users/douglilla/.gem/ruby/1.9.1/gems/rails-2.3.2/lib/rails_generator.rb:34:in
require' from /Users/douglilla/.gem/ruby/1.9.1/gems/rails-2.3.2/lib/rails_generator.rb:34:in<top (required)>’
from /Users/douglilla/.gem/ruby/1.9.1/gems/rails-2.3.2/bin/rails:14:in
require' from /Users/douglilla/.gem/ruby/1.9.1/gems/rails-2.3.2/bin/rails:14:in<top (required)>’
from /usr/local/bin/rails:19:in load' from /usr/local/bin/rails:19:in

Any suggestions would be greatly appreciated.

Thanks,

DL

On Wed, Jun 3, 2009 at 10:06 PM, Doug Lilla <
[email protected]> 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 T. wrote:

On Wed, Jun 3, 2009 at 10:06 PM, Doug Lilla <
[email protected]> 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

Conrad T. wrote:

On Thu, Jun 4, 2009 at 7:08 AM, Doug Lilla
<[email protected]

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:
  • REMOTE SOURCES:

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

DL

On Thu, Jun 4, 2009 at 2:24 PM, Doug Lilla
<[email protected]

wrote:

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

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

On Thu, Jun 4, 2009 at 7:08 AM, Doug Lilla
<[email protected]

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

On Thu, Jun 4, 2009 at 3:02 PM, Doug Lilla
<[email protected]

wrote:

- http://gems.rubyforge.org/

rm -rfi ${HOME}/.gem
examine files in directory /Users/douglilla/.gem? yes

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

Conrad T. wrote:

On Thu, Jun 4, 2009 at 2:24 PM, Doug Lilla
<[email protected]

wrote:

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

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