Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialalborz
Full Stack JavaScript Techdegree Graduate 30,885 PointsGetting errors when attempting to install the money library
When I type "gem install money" I get the following error messages which then concludes in failing to install the library:
Error loading RubyGems plugin "/Users/alby/.rvm/gems/ruby-2.1.1@global/gems/executable-hooks-1.3.1/lib/rubygems_plugin.rb": dlopen(/Users/alby/.rbenv/versions/2.1.4/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle, 9): Library not loaded: @@HOMEBREW_CELLAR@@/openssl/1.0.1j/lib/libcrypto.1.0.0.dylib Referenced from: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib Reason: image not found - /Users/alby/.rbenv/versions/2.1.4/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle (LoadError) Error loading RubyGems plugin "/Users/alby/.rvm/gems/ruby-2.1.1@global/gems/gem-wrappers-1.2.4/lib/rubygems_plugin.rb": dlopen(/Users/alby/.rbenv/versions/2.1.4/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle, 9): Library not loaded: @@HOMEBREW_CELLAR@@/openssl/1.0.1j/lib/libcrypto.1.0.0.dylib Referenced from: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib Reason: image not found - /Users/alby/.rbenv/versions/2.1.4/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle (LoadError) ERROR: Loading command: install (LoadError) dlopen(/Users/alby/.rbenv/versions/2.1.4/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle, 9): Library not loaded: @@HOMEBREW_CELLAR@@/openssl/1.0.1j/lib/libcrypto.1.0.0.dylib Referenced from: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib Reason: image not found - /Users/alby/.rbenv/versions/2.1.4/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle ERROR: While executing gem ... (NoMethodError) undefined method `invoke_with_build_args' for nil:NilClass
This is blocking me from completing this portion of the course. Thanks in advance!
alborz
Full Stack JavaScript Techdegree Graduate 30,885 PointsWhen I check for both versions, this is what I get below:
albys-mbp:~ alby$ rbenv -v rbenv 0.4.0-129-g7e0e85b albys-mbp:~ alby$ rvm -v Warning! PATH is not properly set up, '/Users/alby/.rvm/gems/ruby-2.1.1/bin' is not at first place, usually this is caused by shell initialization files - check them for 'PATH=...' entries, it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles', to fix temporarily in this shell session run: 'rvm use ruby-2.1.1'.
rvm 1.25.20 (stable) by Wayne E. Seguin wayneeseguin@gmail.com, Michal Papis mpapis@gmail.com [https://rvm.io/]
Maciej Czuchnowski
36,441 PointsIs this Mac? I know that rbenv and rvm don't work well together and this may cause your error. I'm not a Mac user, so I can't tell you exactly what to do and how (under Linux I would remove both and then reinstall only one of them, personally I prefer rvm).
alborz
Full Stack JavaScript Techdegree Graduate 30,885 PointsYes, this is Mac. I'm using a MacBook Pro ... I notice the instructions the shell returns but I'm just a little apprehensive in making any changes to my machine without knowing for sure ;-)
Maciej Czuchnowski
36,441 PointsYeah, I can imagine, let's wait for some Mac user to tell you what to do ;).
alborz
Full Stack JavaScript Techdegree Graduate 30,885 PointsCan anyone please help? I'm not sure if I need to reinstall my OSX; and if I do, how should I go about it if I want to keep my files and settings, but just want to fix this issue? Thanks
1 Answer
Daniel Reedy
25,284 PointsYou'll see this kind of error when you either upgrade libraries using homebrew, command-line tools, or your operating system.
The easiest thing to fix it is to reinstall the ruby version with rvm. Enter this on the command line:
rvm reinstall --disable-binary 2.1
alborz
Full Stack JavaScript Techdegree Graduate 30,885 PointsHere's what I got after running the command. The first time around it asked me:
-
WARNING: You have '~/.profile' file, you might want to load it, to do that add the following line to '/Users/alby/.bash_profile':
source ~/.profile
- No new notes to display.
RVM reloaded!
So I did the above by opening that file and adding "source ~/.profile " to it, but it didn't seem to work, as when I tried again to run the command you gave me the terminal gave me the below:
albys-mbp:~ alby$ rvm reinstall --disable-binary 2.1
Checking requirements for osx.
dyld: Library not loaded: @@HOMEBREW_CELLAR@@/openssl/1.0.1j/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/opt/openssl/bin/openssl
Reason: image not found
Failed reading certificates path for '/usr/local/opt/openssl/bin/openssl' with return code: (0).
RVM autolibs is now configured with mode '4' =>
'Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X).',
please run rvm autolibs enable
to let RVM do its job or run and read rvm autolibs [help]
or visit https://rvm.io/rvm/autolibs for more information.
Requirements installation failed with status: 133.
albys-mbp:~ alby$ rvm autolibs enable albys-mbp:~ alby$
Notice how the command line is returned once I type "rvm autolibs enable" this time around? It seems like I'm stuck.
alborz
Full Stack JavaScript Techdegree Graduate 30,885 PointsDo you think this has anything to do with it? I got this after running brew doctor:
Warning: You have an outdated version of /usr/bin/install_name_tool installed. This will cause binary package installations to fail. This can happen if you install osx-gcc-installer or RailsInstaller. To restore it, you must reinstall OS X or restore the binary from the OS packages.
Warning: You seem to have osx-gcc-installer installed.
Homebrew doesn't support osx-gcc-installer. It causes many builds to fail and
is an unlicensed distribution of really old Xcode files.
Please run xcode-select --install
to install the CLT.
Maciej Czuchnowski
36,441 PointsMaciej Czuchnowski
36,441 PointsDo you have rbenv and rvm installed simultaneously?