I’ve done local installs of ruby-1.8.4, then rubygems-0.8.11, then:
% gem install rails
I get rails and its dependencies all going into:
/local/pkgs/ruby-1.8.4/lib/ruby/gems/1.8
i.e.
/local/pkgs/ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2
In the rails directory I see:
/local/pkgs/ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/bin/rails
which I presume is what is executed when I’m supposed to type:
% rails /path-to-my-app
But this rails file is not executable! Or when I type
% ruby rails /path-to-my-app
I get errors:
./…/lib/rails_generator/options.rb:33:in default_options': undefined methodwrite_inheritable_attribute’ for Rails::Generator::Base:Class
(NoMethodError)
from ./…/lib/rails_generator/base.rb:51
from
/local/pkgs/ruby-1.8.4/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require’
from ./…/lib/rails_generator.rb:34
from rails:13
Maybe there are some environment variables to set???
I’ve done local installs of ruby-1.8.4, then rubygems-0.8.11, then:
% gem install rails
I get rails and its dependencies all going into:
/local/pkgs/ruby-1.8.4/lib/ruby/gems/1.8
i.e.
/local/pkgs/ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2
In the rails directory I see:
/local/pkgs/ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/bin/rails
which I presume is what is executed when I’m supposed to type:
% rails /path-to-my-app
But this rails file is not executable! Or when I type
% ruby rails /path-to-my-app
I get errors:
./…/lib/rails_generator/options.rb:33:in default_options': undefined methodwrite_inheritable_attribute’ for Rails::Generator::Base:Class
(NoMethodError)
from ./…/lib/rails_generator/base.rb:51
from
/local/pkgs/ruby-1.8.4/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require’
from ./…/lib/rails_generator.rb:34
from rails:13
Maybe there are some environment variables to set???
Thanks!
David
I needed to add “require ‘rubygems’” on the first line of rails. Then
running:
% ruby rails /path-to-my-app
generates the framework.