2012-07-28 40 views
0

當我嘗試啓動一個新的rails項目時,我卡住了。它爲json 1.7.4而哭泣。我在窗戶上。Rails無法生成新項目,因爲'MAKE'

rails new delete 
     create 
     create README.rdoc 
. 
. 
. 
     run bundle install 
Fetching source index for https://rubygems.org/ 
Using rake (0.9.2.2) 
Using i18n (0.6.0) 
Using multi_json (1.3.6) 
Using activesupport (3.2.6) 
Using builder (3.0.0) 
. 
. 
. 
Using coffee-script (2.2.0) 
Using rack-ssl (1.3.2) 
Installing json (1.7.4) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension 
. 
     C:/Programozas/Ruby192/bin/ruby.exe extconf.rb 
creating Makefile 

make 
'make' is not recognized as an internal or external command, 
operable program or batch file. 


Gem files will remain installed in C:/Programozas/Ruby192/lib/ruby/gems/1.9.1/ge 
ms/json-1.7.4 for inspection. 
Results logged to C:/Programozas/Ruby192/lib/ruby/gems/1.9.1/gems/json-1.7.4/ext 
/json/ext/generator/gem_make.out 
An error occured while installing json (1.7.4), and Bundler cannot continue. 
Make sure that `gem install json -v '1.7.4'` succeeds before bundling. 

它也會爲gem install json -v'1.7.4'刪除同樣的錯誤。 我該怎麼辦?

回答

1

您需要在具有可理解make的軟件的環境中運行。你的Windows環境似乎沒有這樣的軟件。

它看起來像在Windows上使用Rails進行開發的常見方式是使用RubyInstaller。這裏的人有類似的問題(經過30秒的谷歌搜索)有固定的問題類似於你的DevKit隨RubyInstaller,因爲它提供了「...一個」理智的「環境...與make,gcc ,sh和類似的* nix構建工具安裝...「

+0

其實我做了一個乾淨的重新安裝有紅寶石安裝程序,而現在一切都很好。但正如我所看到的,你的建議是類似的,我同意它。你的。 – Kael 2012-07-28 19:59:50

0

我在Windows 7(32位)上,並在創建新項目時遇到此類似問題。 我已經在我的\ DevKit中安裝了DevKit。我得到的錯誤信息說:

請更新您的PATH包括構建工具或從「http://rubyinstaller.org/downloads」下載的devkit ,並按照指示 在的「http:// github上。 com/oneclick/ruby​​installer/wiki/Development-Kit' 安裝json(1.7.4)時發生錯誤,並且Bundler無法繼續。 確保gem install json -v '1.7.4'在捆綁之前成功。

C:\ myrailsproject> gem install json -v 1.7.4 錯誤:安裝json時出錯: 'json'原生gem需要安裝構建工具。

請更新您的PATH包括構建工具或從「http://rubyinstaller.org/downloads」下載的devkit ,並按照指示 在「http://github.com/oneclick/rubyinstaller/wiki/開發-Kit的」

更新寶石文件中使用JSON 1.7.3運行樣樣精

相關問題