Reputation: 2763
I used RVM but now I'm trying to use rbenv to test because it's used in a tutorial I liked.
I installed rbenv with Homebrew. Then I commented-out the line to load RVM in my ~/.bash_profile
:
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
#[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/shims:$PATH"
I installed Ruby:
$ rbenv install 2.2.1
$ rbenv global 2.2.1
but when I try to install Rails I get this error:
$ gem install rails -v 4.2.0 --no-ri --no-rdoc
Ignoring RedCloth-4.2.9 because its extensions are not built. Try: gem pristine RedCloth --version 4.2.9
Ignoring bcrypt-3.1.10 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.10
Ignoring bigdecimal-1.2.7 because its extensions are not built. Try: gem pristine bigdecimal --version 1.2.7
Ignoring binding_of_caller-0.7.2 because its extensions are not built. Try: gem pristine binding_of_caller --version 0.7.2
Ignoring byebug-8.2.2 because its extensions are not built. Try: gem pristine byebug --version 8.2.2
Ignoring byebug-8.2.1 because its extensions are not built. Try: gem pristine byebug --version 8.2.1
Ignoring debug_inspector-0.0.2 because its extensions are not built. Try: gem pristine debug_inspector --version 0.0.2
Ignoring eventmachine-1.0.9.1 because its extensions are not built. Try: gem pristine eventmachine --version 1.0.9.1
Ignoring eventmachine-1.0.8 because its extensions are not built. Try: gem pristine eventmachine --version 1.0.8
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring fast-stemmer-1.0.2 because its extensions are not built. Try: gem pristine fast-stemmer --version 1.0.2
Ignoring ffi-1.9.10 because its extensions are not built. Try: gem pristine ffi --version 1.9.10
Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.2.7
Ignoring io-console-0.4.5 because its extensions are not built. Try: gem pristine io-console --version 0.4.5
Ignoring nokogiri-1.6.7.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7.2
Ignoring nokogiri-1.6.7.1 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7.1
Ignoring nokogiri-1.6.7 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7
Ignoring posix-spawn-0.3.11 because its extensions are not built. Try: gem pristine posix-spawn --version 0.3.11
Ignoring psych-2.0.17 because its extensions are not built. Try: gem pristine psych --version 2.0.17
Ignoring psych-2.0.16 because its extensions are not built. Try: gem pristine psych --version 2.0.16
Ignoring rdiscount-2.1.8 because its extensions are not built. Try: gem pristine rdiscount --version 2.1.8
Ignoring redcarpet-3.3.4 because its extensions are not built. Try: gem pristine redcarpet --version 3.3.4
Ignoring redcarpet-3.3.3 because its extensions are not built. Try: gem pristine redcarpet --version 3.3.3
Ignoring sqlite3-1.3.11 because its extensions are not built. Try: gem pristine sqlite3 --version 1.3.11
Ignoring therubyracer-0.12.2 because its extensions are not built. Try: gem pristine therubyracer --version 0.12.2
Ignoring thin-1.6.4 because its extensions are not built. Try: gem pristine thin --version 1.6.4
Ignoring thin-1.5.1 because its extensions are not built. Try: gem pristine thin --version 1.5.1
Ignoring yajl-ruby-1.2.1 because its extensions are not built. Try: gem pristine yajl-ruby --version 1.2.1
Ignoring RedCloth-4.2.9 because its extensions are not built. Try: gem pristine RedCloth --version 4.2.9
Ignoring bcrypt-3.1.10 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.10
Ignoring bigdecimal-1.2.7 because its extensions are not built. Try: gem pristine bigdecimal --version 1.2.7
Ignoring binding_of_caller-0.7.2 because its extensions are not built. Try: gem pristine binding_of_caller --version 0.7.2
Ignoring byebug-8.2.2 because its extensions are not built. Try: gem pristine byebug --version 8.2.2
Ignoring byebug-8.2.1 because its extensions are not built. Try: gem pristine byebug --version 8.2.1
Ignoring debug_inspector-0.0.2 because its extensions are not built. Try: gem pristine debug_inspector --version 0.0.2
Ignoring eventmachine-1.0.9.1 because its extensions are not built. Try: gem pristine eventmachine --version 1.0.9.1
Ignoring eventmachine-1.0.8 because its extensions are not built. Try: gem pristine eventmachine --version 1.0.8
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring fast-stemmer-1.0.2 because its extensions are not built. Try: gem pristine fast-stemmer --version 1.0.2
Ignoring ffi-1.9.10 because its extensions are not built. Try: gem pristine ffi --version 1.9.10
Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.2.7
Ignoring io-console-0.4.5 because its extensions are not built. Try: gem pristine io-console --version 0.4.5
Ignoring nokogiri-1.6.7.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7.2
Ignoring nokogiri-1.6.7.1 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7.1
Ignoring nokogiri-1.6.7 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7
Ignoring posix-spawn-0.3.11 because its extensions are not built. Try: gem pristine posix-spawn --version 0.3.11
Ignoring psych-2.0.17 because its extensions are not built. Try: gem pristine psych --version 2.0.17
Ignoring psych-2.0.16 because its extensions are not built. Try: gem pristine psych --version 2.0.16
Ignoring rdiscount-2.1.8 because its extensions are not built. Try: gem pristine rdiscount --version 2.1.8
Ignoring redcarpet-3.3.4 because its extensions are not built. Try: gem pristine redcarpet --version 3.3.4
Ignoring redcarpet-3.3.3 because its extensions are not built. Try: gem pristine redcarpet --version 3.3.3
Ignoring sqlite3-1.3.11 because its extensions are not built. Try: gem pristine sqlite3 --version 1.3.11
Ignoring therubyracer-0.12.2 because its extensions are not built. Try: gem pristine therubyracer --version 0.12.2
Ignoring thin-1.6.4 because its extensions are not built. Try: gem pristine thin --version 1.6.4
Ignoring thin-1.5.1 because its extensions are not built. Try: gem pristine thin --version 1.5.1
Ignoring yajl-ruby-1.2.1 because its extensions are not built. Try: gem pristine yajl-ruby --version 1.2.1
Error loading RubyGems plugin "/Users/romenigld/.rvm/gems/ruby-2.2.3@global/gems/executable-hooks-1.3.2/lib/rubygems_plugin.rb": cannot load such file -- executable-hooks/wrapper (LoadError)
Error loading RubyGems plugin "/Users/romenigld/.rvm/gems/ruby-2.2.3@global/gems/gem-wrappers-1.2.7/lib/rubygems_plugin.rb": cannot load such file -- gem-wrappers (LoadError)
Ignoring psych-2.0.17 because its extensions are not built. Try: gem pristine psych --version 2.0.17
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/Users/romenigld/.rbenv/versions/2.2.1/bin/ruby -r ./siteconf20160303-58397-1nyc1kp.rb extconf.rb
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using packaged libraries.
/Users/romenigld/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'mini_portile2' (~> 2.0.0.rc2) - did find: [mini_portile2-2.1.0] (Gem::LoadError)
Checked in 'GEM_PATH=/Users/romenigld/.gem/ruby/2.2.0:/Users/romenigld/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0:/Users/romenigld/.rvm/gems/ruby-2.2.3', execute `gem env` for more information
from /Users/romenigld/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/dependency.rb:324:in `to_spec'
from /Users/romenigld/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from extconf.rb:396:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/romenigld/.rvm/gems/ruby-2.2.3/gems/nokogiri-1.6.7.2 for inspection.
Results logged to /Users/romenigld/.rvm/gems/ruby-2.2.3/extensions/x86_64-darwin-15/2.2.0-static/nokogiri-1.6.7.2/gem_make.out
Is it possible that RVM and rbenv are working?
Upvotes: 0
Views: 1198
Reputation: 160551
"Gem files will remain installed in /Users/romenigld/.rvm"
makes it look like RVM is still trying to control your Ruby installation.
RVM is not compatible with rbenv. Per the rbenv docs:
rbenv is incompatible with RVM. Please make sure to fully uninstall RVM and remove any references to it from your shell initialization files before installing rbenv.
I'd highly recommend reading the entire rbenv documentation; It covers this, along with the use of plugins which enhance using rbenv.
Upvotes: 2