简体   繁体   中英

error installing ruby gem johnson osx

I am trying to install the gem johnson for a sample application and it's proving to be difficult. I have ruby version ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-darwin12.2.0] installed, and trying to install johnson version 2.0.0.pre3 (what the failed bundle install out said). When trying to install johnson I get a large amount of output, so for now I'll just give the first lines and hope it's enough.

sudo gem install johnson -v '2.0.0.pre3'
Building native extensions.  This could take a while...
ERROR:  Error installing johnson:
ERROR: Failed to build gem native extension.

Ruby 1.9 Incompatibility

I can reproduce this problem on my mac with ruby 1.9.3p125.

As far as I can tell Johnson is not compatible with Ruby 1.9. This issue was raised two years ago https://github.com/jbarnette/johnson/issues/30 , however the project has not been updated in the past three years. On the issue link above, they discuss an experimental 1.9.1 branch that is probably not want you want.

Switching to my system ruby (1.8.7) on Mountain Lion allows me to install the gem:

$ rvm system
$ ruby --version
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
$ sudo gem install johnson
Building native extensions.  This could take a while...
Successfully installed johnson-1.2.0
1 gem installed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM