I can not install rails on OSX 10.7.5

Whenever I run

sudo gem install rails 

I get the following output:

  ERROR: Loading command: install (LoadError) cannot load such file -- openssl ERROR: While executing gem ... (NoMethodError) undefined method `invoke_with_build_args' for nil:NilClass 

RVM Version: rvm 1.18.14 and Ruby 2.0.0p0

+4
source share
5 answers

I get it!

So, first I deleted everything related to RVM, as suggested in some answers. Rebooted The latest version of Xcode and command-line tools from Xcode (Xcode-prefereces-downloads) are installed. Then it rebooted again and finally used RailsInstaller. Once I used rails, and all is well in the world. Thank you all for your help.

0
source

you need to reinstall rubies:

 rvm get head --autolibs=3 rvm pkg remove rvm reinstall all --force 

new autolibs supporrt will take care of updating dependencies and include them in ruby

+8
source

Do you have a Homebrew installed on your system? If yes, try

 brew install openssl 

on the command line.

+4
source

hmm, you have rvm, but why do you need sudo? I thought rvm was in sandbox mode. Anyway, the error just means that it cannot find the ssl path. First, make sure you have openssl installed. If not, you need to install it (brew, macport, etc.) Or rvm pkg install openssl and let rvm manage its path (you already have rvm). After that, you will need to reinstall ruby. RVM manual here

+3
source

You are not using sudo. sudo is used ONLY for a multi-user installation, and only then during the initial installation and adding your user to the rvm group (if the installer did not do this for you, which usually indicates that you installed the installation incorrectly)

0
source

All Articles