Forum: Ruby on Rails running rails on Linux

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
David M. (Guest)
on 2006-04-13 22:31
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
method `write_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
David M. (Guest)
on 2006-04-13 22:33
David M. wrote:
> 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
> method `write_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.

This should be achieved some other way.. HOW?
Patrick H. (Guest)
on 2006-04-13 23:17
(Received via mailing list)
On 4/13/06, David M. <removed_email_address@domain.invalid> wrote:
> > /local/pkgs/ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/bin/rails
> >         from
>
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>

You might want to read http://docs.rubygems.org/read/chapter/3#page70

but the short of it is set an environment variable:

export RUBYOPT=rubygems

pth
This topic is locked and can not be replied to.