这是一个错误片段:红宝石创业板安装错误
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? –