Following instructions from http://web2linux.com/installing-rails-3-on-ubuntu-10-04-lucid-lynx/ I get to the following line:
rvm install 1.9.2
returns:
ruby-1.9.2-p0 - #fetching
ruby-1.9.2-p0 - #extracting ruby-1.9.2-p0 to
mv: cannot move `/tmp/rvm_src_18035/ruby-1.9.2-p0' to `': No such file or directory
~/.rvm/scripts/manage: line 1237: ruby-1.9.2-p0 - #extracted to : command not found
Running autoconf
Error running 'autoconf', please check ~/.rvm/log/ruby-1.9.2-p0/autoconf*.log
Skipping configure step, 'configure' does not exist, did autoconf not run successfully?
ruby-1.9.2-p0 - #compiling
Error running 'make ', please check ~/.rvm/log/ruby-1.9.2-p0/make*.log
There has been an error while running make. Halting the installation.
looking at .rvm/scripts/manage it seems that $rvm_ruby_src_path is not set. Am I missing anything in my setup? Below are more details on my environment:
$ rvm info
system:
system:
uname: "Linux host 2.6.32-24-generic #42-Ubuntu SMP Fri Aug 20 14:21:58 UTC 2010 x86_64 GNU/Linux"
bash: "/bin/bash => GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.0.7 by Wayne E. Seguin (wayneeseguin#gmail.com) [http://rvm.beginrescueend.com/]"
homes:
gem: "not set"
ruby: "not set"
binaries:
ruby: "/usr/bin/ruby"
irb: "/usr/bin/irb"
gem: "/usr/bin/gem"
rake: "/usr/bin/rake"
environment:
PATH: "~/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
GEM_HOME: ""
GEM_PATH: ""
BUNDLE_PATH: ""
MY_RUBY_HOME: ""
IRBRC: ""
RUBYOPT: ""
gemset: ""
$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- ~/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "--no-ri --no-rdoc"
- REMOTE SOURCES:
- http://rubygems.org/
I just reinstalled my mac, and got the same problem.
Edit: after I run rvm update && rvm reload, it works!
Related
I have installed ruby gem nmatrix with the command below:
sudo gem install nmatrix
I have installed it in ubuntu 12.04 . My gem env is as below:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.25
- RUBY VERSION: 1.9.3 (2013-05-15 patchlevel 429) [i686-linux]
- INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-1.9.3-p429
- RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-1.9.3-p429/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-1.9.3-p429/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/local/rvm/gems/ruby-1.9.3-p429
- /usr/local/rvm/gems/ruby-1.9.3-p429#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.github.com/", "http://rubygems.org"]
- REMOTE SOURCES:
- http://gems.github.com/
- http://rubygems.org
Now when I go to irb and run code as below,to use NMatrix it gives error as :
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'nmatrix'
LoadError: cannot load such file -- nmatrix
from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from (irb):2
from /usr/local/rvm/rubies/ruby-1.9.3-p429/bin/irb:13:in `<main>'
irb(main):003:0>
So what should I do to use nMatrix gem I just installed. Also when i do
gem list
It is not showing nmatrix gem.
Doing
sudo gem list
only shows nmatrix gem.
Thanks.
I am a novice having major problems with rvm. bundle install gives me the error
`ERROR: Gem bundler is not installed, run `gem install bundler` first.
even though I know it is installed, as it shows up if I run gem list -l. I suspect that's returning a list of system gems, which would suggest that rvm is definitely the problem. Trying gem install bundler again doesn't help. I've looked around at other people who have had similar problems and can't find an answer that helps whatever situation I'm in. rvm info gives me this output:
# rvm info
system:
system:
uname: "Linux box576.bluehost.com 2.6.32-20130101.60.1.bh6.x86_64 #1 SMP Tue Jan 1 22:59:09 EST 2013 x86_64 x86_64 x86_64 GNU/Linux"
system: "unknown/libc-2.12/x86_64"
bash: "/ramdisk/bin/bash => GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)"
zsh: "/usr/bin/zsh => zsh 4.3.10 (x86_64-redhat-linux-gnu)"
rvm:
version: "rvm 1.18.8 (master) by Wayne E. Seguin <wayneeseguin#gmail.com>, Michal Papis <mpapis#gmail.com> [https://rvm.io/]"
updated: "22 hours 59 minutes ago"
homes:
gem: "/home7/contenw6/ruby/gems"
ruby: "/home7/contenw6/.rvm/rubies/ruby-1.9.3-p194"
binaries:
ruby: "/home7/contenw6/.rvm/rubies/ruby-1.9.3-p194/bin/ruby"
irb: "/home7/contenw6/.rvm/rubies/ruby-1.9.3-p194/bin/irb"
gem: "/home7/contenw6/.rvm/rubies/ruby-1.9.3-p194/bin/gem"
rake: "/home7/contenw6/.rvm/rubies/ruby-1.9.3-p194/bin/rake"
environment:
PATH: "/usr/local/jdk/bin:/home7/contenw6/.rvm/gems/ruby-1.9.3-p194#projecta/bin:/home7/contenw6/.rvm/gems/ruby-1.9.3-p194#global/bin:/home7/contenw6/.rvm/rubies/ruby-1.9.3-p194/bin:/home7/contenw6/.rvm/bin:/home7/contenw6/perl5/bin:/usr/lib64/qt-3.3/bin:/ramdisk/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin:/home7/contenw6/ruby/gems/bin:/home7/contenw6/bin"
GEM_HOME: "/home7/contenw6/ruby/gems"
GEM_PATH: "/home7/contenw6/ruby/gems:/usr/lib/ruby/gems/1.8"
MY_RUBY_HOME: "/home7/contenw6/.rvm/rubies/ruby-1.9.3-p194"
IRBRC: "/home7/contenw6/.rvm/rubies/ruby-1.9.3-p194/.irbrc"
RUBYOPT: ""
gemset: ""
If I do rvm use 1.9.3-p194#projecta --default the environment section now looks like this:
environment:
PATH: "/home7/contenw6/.rvm/gems/ruby-1.9.3-p194#projecta/bin:/home7/contenw6/.rvm/gems/ruby-1.9.3-p194#global/bin:/home7/contenw6/.rvm/rubies/ruby-1.9.3-p194/bin:/home7/contenw6/.rvm/bin:/usr/local/jdk/bin:/home7/contenw6/perl5/bin:/usr/lib64/qt-3.3/bin:/ramdisk/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin:/home7/contenw6/ruby/gems/bin:/home7/contenw6/bin"
GEM_HOME: "/home7/contenw6/.rvm/gems/ruby-1.9.3-p194#projecta"
GEM_PATH: "/home7/contenw6/.rvm/gems/ruby-1.9.3-p194#projecta:/home7/contenw6/.rvm/gems/ruby-1.9.3-p194#global"
MY_RUBY_HOME: "/home7/contenw6/.rvm/rubies/ruby-1.9.3-p194"
IRBRC: "/home7/contenw6/.rvm/rubies/ruby-1.9.3-p194/.irbrc"
RUBYOPT: ""
gemset: "projecta"
but when I log in and try again it reverts back to the first output above. I've clearly screwed something up somewhere, and I have no idea how to fix my installation or where the problem is coming from. Any help would be greatly appreciated.
this looks like your previous ruby settings, check your ~/.bashrc or ~/.zshenv for any variables set that might contain the mentioned paths
if you do not find anything try checking in /etc:
grep -rn "/home7/contenw6/ruby/gems" /etc
update from comments:
sed -i'' '/GEM_HOME=/ d;' ~/.bashrc
rm ~/.gemrc
This one was helped me
cd ~/.rvm/bin
rm bundle
Then return to you project folder install a bundler gem and run bundle w/o problems
I installed ZSH today and RVM, I set up Ruby 1.9.3 to be my default. When I type rvm use 1.9.3 --default and then went into my rails project and ran rails s it worked fine. If I close my terminal and then come back to my rails project and try rails s I get the following error:
/Users/jeff/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
from /Users/jeff/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/jeff/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems.rb:1229:in `gem'
from /Users/jeff/.rvm/gems/ruby-1.9.3-p125/bin/rails:18:in `<main>'
I would then type rvm use 1.9.3 and the error would go away, I did some research and found that rvm info was losing all of my rvm environment variables, here is the output of rvm info:
system:
system:
uname: "Darwin binfalse.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11)"
zsh: "/opt/local/bin/zsh => zsh 4.3.17 (x86_64-apple-darwin11.3.0)"
rvm:
version: "rvm 1.10.3 by Wayne E. Seguin <wayneeseguin#gmail.com>, Michal Papis <mpapis#gmail.com> [https://rvm.beginrescueend.com/]"
updated: "51 minutes 38 seconds ago"
homes:
gem: "not set"
ruby: "not set"
binaries:
ruby: "/Users/jeff/.rvm/rubies/ruby-1.9.3-p125/bin/ruby"
irb: "/Users/jeff/.rvm/rubies/ruby-1.9.3-p125/bin/irb"
gem: "/Users/jeff/.rvm/rubies/ruby-1.9.3-p125/bin/gem"
rake: "/Users/jeff/.rvm/gems/ruby-1.9.3-p125/bin/rake"
environment:
PATH: "/Users/jeff/.rvm/gems/ruby-1.9.3-p125/bin:/Users/jeff/.rvm/gems/ruby-1.9.3-p125#global/bin:/Users/jeff/.rvm/rubies/ruby-1.9.3-p125/bin:/Users/jeff/.rvm/bin:/opt/local/bin:/opt/local/sbin:/Library/PostgreSQL/9.0/bin:/usr/local/mysql/bin:/usr/local/mysql:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
GEM_HOME: ""
GEM_PATH: ""
MY_RUBY_HOME: ""
IRBRC: ""
RUBYOPT: ""
gemset: ""
How do I make it so my env settings are not lost? Works just fine with bash.
This is issue with loading RVM in proper place of configuration files.
You can fix it by calling:
rvm get stable --auto # OR:
rvm get head --auto
And restart computer - this is important as it forces reload of all config files.
I have following (and have shortened the full path to "/.../"):
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.21
- RUBY VERSION: 1.9.2 (2012-02-14 patchlevel 318) [x86_64-linux]
- INSTALLATION DIRECTORY: /.../.rvm/gems/ruby-1.9.2-p318#rails-3.0
- RUBY EXECUTABLE: /.../.rvm/rubies/ruby-1.9.2-p318/bin/ruby
- EXECUTABLE DIRECTORY: /.../.rvm/gems/ruby-1.9.2-p318#rails-3.0/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /.../.rvm/gems/ruby-1.9.2-p318#rails-3.0
- /.../.rvm/gems/ruby-1.9.2-p318#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
As you can see I have #global and #rails-3.0 gemsets. Passenger 3.0.11 is installed in the #global gemset, and I have a .rmvrc file in my application root:
rvm ruby-1.9.2-p318#rails-3.0
However, after running $ bundle install and restarting the app via $ touch tmp/restart.txt I keep getting the Passenger error screen with the following:
Error message: Could not find aaronh-chronic-0.3.9 in any of the sources (Bundler::GemNotFound)
This gem is installed in the #rails-3.0 gemset
Gemfile here.
$ gem list here
If I install the aaronh-chronic gem in the #global gemset, then it just complains about the next one in line. It's like it is only checking the #global gemset instead of first looking in my #rails-3.0 gemset. How can I get it to use both gemsets? (Full backtrace here.)
UPDATE: Here is my Passenger Apache configuration:
# In /etc/apache2/mods_available/passenger.load
LoadModule passenger_module /.../.rvm/gems/ruby-1.9.2-p318#global/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
# In /etc/apache2/mods_available/passenger.conf
<IfModule mod_passenger.c>
PassengerRoot /.../.rvm/gems/ruby-1.9.2-p318#global/gems/passenger-3.0.11
PassengerRuby /.../.rvm/wrappers/ruby-1.9.2-p318#global/ruby
</IfModule>
Try bundle update and gem update --system.
I am using window 7.
I have upgraded rails 2.0.2 to rails 3.0.9 with ruby as 1.8.7. I have changed in evironment.rb as:
RAILS_GEM_VERSION = '3.0.9' unless defined? RAILS_GEM_VERSION
still I am unable to start server.
RubyGems Environment:
- RUBYGEMS VERSION: 1.7.2
- RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8
- RUBY EXECUTABLE: C:/InstantRails-2.0-win/ruby/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/InstantRails-2.0-win/ruby/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8
- C:/Users/SUKETA/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.github.com", "http://rubygems.org/"]
- REMOTE SOURCES:
- http://gems.github.com
- http://rubygems.org/
Any suggestion
Maybe it can help you:
http://railscasts.com/episodes/225-upgrading-to-rails-3-part-1
Is part of a complete guide that explain how to do this migration on the right way.
However according to http://weblog.rubyonrails.org/2010/9/4/ruby-on-rails-2-3-9-released (official Rails blog) it is recommended to first migrate to Rails 2.3.9
Migrating from rails 2.0.2 to Rails 3 isn't exactly a simple task. To give you an idea Ryan Bates made 3 screencast about this. You can find out more here; http://railscasts.com/episodes/225-upgrading-to-rails-3-part-1