error creating project rails on Rubymine

dear all,

i have a trouble when create a project rails on RubyMine, my Operating System is ubuntu 9.04, here is the error massage


usr/local/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/rails _2.3.2_ /home/hendri/RubymineProjects/untitled1 --skip --database=mysql
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/../lib/rails_generator/options.rb:32:in `default_options': undefined method `write_inheritable_attribute' for Rails::Generator::Base:Class (NoMethodError)
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/../lib/rails_generator/base.rb:90
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/../lib/rails_generator.rb:34
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/rails:14:in `require'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/rails:14
    from -e:1:in `load'
    from -e:1

Process finished with exit code 1


what i have to do ?

regards,

Hendri

7 comments
Comment actions Permalink

Hello Hendri,

i have a trouble when create a project rails on RubyMine, my Operating System is ubuntu 9.04, here is the error massage


usr/local/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/rails _2.3.2_ /home/hendri/RubymineProjects/untitled1 --skip --database=mysql
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/../lib/rails_generator/options.rb:32:in `default_options': undefined method `write_inheritable_attribute' for Rails::Generator::Base:Class (NoMethodError)
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/../lib/rails_generator/base.rb:90
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/../lib/rails_generator.rb:34
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/rails:14:in `require'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/rails:14
    from -e:1:in `load'
    from -e:1


Process finished with exit code 1

What ruby version do you use? It seems that you use ruby built locally on your machine, don't you?
Could you please run "gem env" command and post it here.

Regards,
Oleg

0
Comment actions Permalink

dear Oleg,

thank you so much for your advice, here is the information from Setting Ruby SDK and Gems on the Ruby interpereter "RubySDK 1.8.7 (/usr/local/bin/ruby)". so i think, it is the right place to put RubySDK on local mechine. but why when i try to create a project always get this massage error, when i use Windows , there is noi problem.

hendri@ionasia-hendri:~$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.4
  - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.8
     - /home/hendri/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/



Regards,
hendri

0
Comment actions Permalink

dear Hendri,

thank you so much for your advice, here is the information from Setting Ruby SDK and Gems on the Ruby interpereter "RubySDK 1.8.7 (/usr/local/bin/ruby)". so i think, it is the right place to put RubySDK on local mechine. but why when i try to create a project always get this massage error, when i use Windows , there is noi problem.


hendri@ionasia-hendri:~$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.4
  - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.8
     - /home/hendri/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/

How did you install your Ruby interpreter: using "apt-get install ruby" and then created symbolic link /usr/bin/ruby1.8 -> /usr/local/bin/ruby
or just built it from sources?

The same question about gem: how did you installed it?

Regards,
Oleg

0
Comment actions Permalink

dear oleg,

nice advice thanks,

install Ruby with this command "

sudo apt-get install ruby ri rdoc mysql-server libmysql-ruby ruby1.8-dev irb1.8 libdbd-mysql-perl libdbi-perl libmysql-ruby1.8 libmysqlclient15off libnet-daemon-perl libplrpc-perl libreadline-ruby1.8 libruby1.8 mysql-client-5.0 mysql-common mysql-server-5.0 rdoc1.8 ri1.8 ruby1.8 irb libopenssl-ruby libopenssl-ruby1.8 libhtml-template-perl mysql-server-core-5.0
"

 

but i think i don't use link to "/usr/local/bin/ruby"

install gems with this command "

wget http://rubyforge.org/frs/download.php/57643/rubygems-1.3.4.tgz
tar xvzf rubygems-1.3.4.tgz
cd rubygems-1.3.4
sudo ruby setup.rb"

and link to local
"
sudo ln -s /usr/bin/gem1.8 /usr/local/bin/gem
sudo ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby
sudo ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc
sudo ln -s /usr/bin/ri1.8 /usr/local/bin/ri
sudo ln -s /usr/bin/irb1.8 /usr/local/bin/irb
"

this instruction is obtained from "http://www.hackido.com/2009/04/install-ruby-rails-on-ubuntu-904-jaunty.html"


 


then, what should i have to do ?

Regards,
Hendri

0
Comment actions Permalink

Let me reinstall ruby environment the way you have described and check then, I will post result asap.

Regards,
Oleg

0
Comment actions Permalink

Hello Hendri,

I've installed ruby as described in http://www.hackido.com/2009/04/install-ruby-rails-on-ubuntu-904-jaunty.html, but couldn't reproduce your problem.
Could you please provide some steps on "how did you setup Ruby SDK"?

Regards,
Oleg

0
Comment actions Permalink

Oleg,
His symbolic links are wrong.  Please see the following article from Peter Cooper:

http://www.rubyinside.com/how-to-install-a-ruby-18-stack-on-ubuntu-810-from-scratch-1566.html

As shown in the article, he needs to create links shown below:

ln -s /usr/bin/ruby1.8 /usr/bin/ruby
ln -s /usr/bin/rdoc1.8 /usr/bin/rdoc
ln -s /usr/bin/irb1.8 /usr/bin/irb

If he has installed Ruby showing the commands that he does then it is not installed in /usr/local/bin, it is installed in /usr/bin.

I am on Ubuntu 8.10.
Bharat
ln -s /usr/bin/ri1.8 /usr/bin/ri
0

Please sign in to leave a comment.