我在尝试rake db:migrate
时遇到问题。我得到以下错误:ubuntu上的json问题12.04
Could not find json-1.7.5 in any of the sources
Run `bundle install` to install missing gems.
现在,我已经运行bundle install
,它给了一个错误,当它得到JSON,但我再次尝试也无妨,并得到同样的错误当它到达JSON:
Installing json (1.7.5) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot
load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
require' from extconf.rb:1:in
'Gem files will remain installed in /home/chris/.bundler/tmp/2984/gems/json-1.7.5 for inspection. Results logged to /home/chris/.bundler/tmp/2984/gems/json-1.7.5/ext/json/ext/generator/gem_make.out An error occurred while installing json (1.7.5), and Bundler cannot continue. Make sure that
gem install json -v '1.7.5'
succeeds before bundling.
最后一部分说,确保gem install json -v '1.7.5'
绑定前的成功,所以我运行这个命令和JSON精细安装:
Building native extensions. This could take a while...
Successfully installed json-1.7.5
1 gem installed
Installing ri documentation for json-1.7.5...
Installing RDoc documentation for json-1.7.5...
但如果我尝试rake db:migrate
它ST艺术再次出现同样的错误。我已经阅读了有关Mac上的json的问题,但没有任何解决方案的运气。有任何想法吗?
我运行Ubuntu 12.04LTS,红宝石1.9.3,轨3.2.8,宝石1.8.15
http://stackoverflow.com/questions/11058952/why-do-i-get-an-error-installing-the-json-gem-in-ubuntu – uday