我在嘗試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