這是一個錯誤片段:紅寶石創業板安裝錯誤
Using jbuilder (1.5.3) Installing jquery-rails (3.1.0) Installing json (1.8.1) Gem::Installer::ExtensionBuildError: ERROR:
Failed to build gem native extension .
c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe: No such file or directory
-- extconf.r b (LoadError)
Gem files will remain installed in
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9 .1/gems/json-1.8.1 for
inspection. Results logged to
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8.
1/ext/json/ext/generator/gem_make.out An error occurred while
installing json (1.8.1), and Bundler cannot continue. Make sure that
`gem install json -v '1.8.1'` succeeds before bundling.
進入gem install json -v
回報:
'1.8.1' Temporarily enhancing PATH to include DevKit... Building
native extensions. This could take a while... ERROR: Error
installing json:
ERROR: Failed to build gem native extension.
c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe: No such file or directory
-- extconf.r b (LoadError)
Gem files will remain installed in
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9 .1/gems/json-1.8.1 for
inspection. Results logged to
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8.
1/ext/json/ext/generator/gem_make.out
進入bundle install
回報:
Bundler::GemfileNotFound
進入回報:
[email protected] ~/Desktop/ruby/qwerty $ rails s
←[31mCould not find gem 'rails (= 4.0.2) x86-mingw32' in the gems
available on t his machine.←[0m ←[33mRun `bundle install` to install
missing gems.←[0m
我想你是從錯誤的目錄安裝bundle gems,如果你已經創建了一個新的rails應用程序,然後cd進入它,然後做捆綁安裝 –
你有沒有使用rvm/rbenv? –
你有什麼環境? Windows/Linux? –