Hello, I''ve installed Ruby and RubyGems from sources into /opt/rails/, then I installed using gem install rails. All went well installing, but I can''t run rails, I get this error: $ ruby /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/rails helloworld /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/../lib/rails_generator/options.rb:32:in `default_options'': undefined method `write_inheritable_attribute'' for Rails::Generator::Base:Class (NoMethodError) from /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/../lib/rails_generator/base.rb:90 from /opt/rails//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' from /opt/rails//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' from /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/../lib/rails_generator.rb:34 from /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/rails:13:in `require'' from /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/rails:13 any ideas what''s wrong? and/or how to fix it? Thank you. -- J. Pablo Fernández <pupeno-GAtDADarczzQT0dZR+AlfA@public.gmane.org> http://pupeno.com
Some more info: Installing Ruby: $ cd ruby-1.8.6-p111/ $ ./configure --prefix=/opt/rails/ $ make $ make install $ which ruby /opt/rails/bin/ruby $ ruby --version ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux] Good! installing rubygems: cd ../rubygems-0.9.5/ $ ruby setup.rb ... Removing old RubyGems RDoc and ri... Installing rubygems-0.9.5 ri into /opt/rails//lib/ruby/gems/1.8/doc/rubygems-0.9.5/ri... Installing rubygems-0.9.5 rdoc into /opt/rails//lib/ruby/gems/1.8/doc/rubygems-0.9.5/rdoc... As of RubyGems 0.8.0, library stubs are no longer needed. Searching $LOAD_PATH for stubs to optionally delete (may take a while)... ...done. No library stubs found. $ which gem /opt/rails/bin/gem $ gem --version 0.9.5 Good? installing rails $ gem install rails Bulk updating Gem source index for: http://gems.rubyforge.org ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) OpenURI::HTTPError: 404 Not Found reading http://gems.rubyforge.org/gems/activesupport-2.0.1.gem Ooops, let''s try again. In the third try: $ gem install rails Successfully installed actionmailer-2.0.1 Successfully installed activeresource-2.0.1 Successfully installed rails-2.0.1 3 gems installed Installing ri documentation for actionmailer-2.0.1... Installing ri documentation for activeresource-2.0.1... Installing RDoc documentation for actionmailer-2.0.1... Installing RDoc documentation for activeresource-2.0.1... Good I suppose. $ which rails $ First problem. no rails binary/program. $ gem content rails | grep bin /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/about /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/console /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/destroy /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/generate /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/performance /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/performance/benchmarker /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/performance/profiler /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/performance/request /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/plugin /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/process /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/process/inspector /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/process/reaper /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/process/spawner /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/rails /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/runner /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/server Somehow it didn''t install anything on /opt/rails/bin/ as expected. and that rails program just doesn''t work. Any ideas? Thanks. On Sunday 09 December 2007 18:44:42 J. Pablo Fernández wrote:> Hello, > > I''ve installed Ruby and RubyGems from sources into /opt/rails/, then I > installed using gem install rails. All went well installing, but I can''t > run rails, I get this error: > > $ ruby /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/rails helloworld > /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/../lib/rails_generator/op >tions.rb:32:in `default_options'': undefined method > `write_inheritable_attribute'' for Rails::Generator::Base:Class > (NoMethodError) > > from > /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/../lib/rails_generator/ba >se.rb:90 > > from /opt/rails//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'' > > from /opt/rails//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require'' > > from > /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/../lib/rails_generator.rb >:34 from /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/rails:13:in > `require'' > from /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/rails:13 > > > any ideas what''s wrong? and/or how to fix it? > > Thank you.-- J. Pablo Fernández <pupeno-GAtDADarczzQT0dZR+AlfA@public.gmane.org> http://pupeno.com
Solved. It seems it was just a matter of adding /opt/rails/lib/ruby/gems/1.8/bin/ to the path, although I''m not 100% sure that was the only thing that was required, as I also re-installed. Thanks. On Sunday 09 December 2007 20:47:54 J. Pablo Fernández wrote:> Some more info: > > Installing Ruby: > > $ cd ruby-1.8.6-p111/ > $ ./configure --prefix=/opt/rails/ > $ make > $ make install > $ which ruby > /opt/rails/bin/ruby > $ ruby --version > ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux] > > Good! installing rubygems: > > cd ../rubygems-0.9.5/ > $ ruby setup.rb > ... > Removing old RubyGems RDoc and ri... > Installing rubygems-0.9.5 ri > into /opt/rails//lib/ruby/gems/1.8/doc/rubygems-0.9.5/ri... > Installing rubygems-0.9.5 rdoc > into /opt/rails//lib/ruby/gems/1.8/doc/rubygems-0.9.5/rdoc... > As of RubyGems 0.8.0, library stubs are no longer needed. > Searching $LOAD_PATH for stubs to optionally delete (may take a while)... > ...done. > No library stubs found. > $ which gem > /opt/rails/bin/gem > $ gem --version > 0.9.5 > > Good? installing rails > > $ gem install rails > Bulk updating Gem source index for: http://gems.rubyforge.org > ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) > OpenURI::HTTPError: 404 Not Found reading > http://gems.rubyforge.org/gems/activesupport-2.0.1.gem > > Ooops, let''s try again. In the third try: > > $ gem install rails > Successfully installed actionmailer-2.0.1 > Successfully installed activeresource-2.0.1 > Successfully installed rails-2.0.1 > 3 gems installed > Installing ri documentation for actionmailer-2.0.1... > Installing ri documentation for activeresource-2.0.1... > Installing RDoc documentation for actionmailer-2.0.1... > Installing RDoc documentation for activeresource-2.0.1... > > Good I suppose. > > $ which rails > $ > > First problem. no rails binary/program. > > $ gem content rails | grep bin > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/about > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/console > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/destroy > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/generate > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/performance > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/performance/benchmarker > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/performance/profiler > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/performance/request > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/plugin > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/process > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/process/inspector > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/process/reaper > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/process/spawner > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/rails > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/runner > /opt/rails//lib/ruby/gems/1.8/gems/rails-2.0.1/bin/server > > > Somehow it didn''t install anything on /opt/rails/bin/ as expected. and that > rails program just doesn''t work. > > Any ideas? > > Thanks. > > On Sunday 09 December 2007 18:44:42 J. Pablo Fernández wrote: > > Hello, > > > > I''ve installed Ruby and RubyGems from sources into /opt/rails/, then I > > installed using gem install rails. All went well installing, but I can''t > > run rails, I get this error: > > > > $ ruby /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/rails helloworld > > /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/../lib/rails_generator/ > >op tions.rb:32:in `default_options'': undefined method > > `write_inheritable_attribute'' for Rails::Generator::Base:Class > > (NoMethodError) > > > > from > > /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/../lib/rails_generator/ > >ba se.rb:90 > > > > from /opt/rails//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > > `gem_original_require'' > > > > from /opt/rails//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > > `require'' > > > > from > > /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/../lib/rails_generator. > >rb > > > >:34 from /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/rails:13:in > > > > `require'' > > from /opt/rails/lib/ruby/gems/1.8/gems/rails-2.0.1/bin/rails:13 > > > > > > any ideas what''s wrong? and/or how to fix it? > > > > Thank you.-- J. Pablo Fernández <pupeno-GAtDADarczzQT0dZR+AlfA@public.gmane.org> http://pupeno.com