尝试更新到gem 3.0.20并安装DevKit

时间:2013-03-21 15:52:11

标签: ruby ruby-on-rails-3 heroku makefile gem

由于安全补丁,Heroku建议更新到这个宝石,但它引起了各种各样的麻烦,现在我的本地环境无法正常工作。他们建议将此作为安全预防措施。他们建议进入我的应用程序,更改gemfile版本,只需运行“捆绑更新栏”即可。这是输出:

$ bundle update rails
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.20)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.20)
Using erubis (2.6.6)
Using rack (1.2.8)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.37)
Using actionpack (3.0.20)
Using mime-types (1.21)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.2.19)
Using actionmailer (3.0.20)
Using arel (2.0.10)
Using activerecord (3.0.20)
Using activeresource (3.0.20)
Using bundler (1.0.22)
Installing json (1.7.7) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 
c:/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:/Ruby192/lib/ruby/gems/1.9.1/gems/json-1.7.7 for inspection.

Results logged to c:/Ruby192/lib/ruby/gems/1.9.1/gems/json-1.7.7/ext/json/ext/generator/gem_make.out
An error occured while installing json (1.7.7), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.7'` succeeds before bundling

然后他们在这里指出一个有类似问题的人。它涉及下载Devkit等。我尝试按照说明进行操作,但现在一切都破了。我熟悉使用Ruby on Rails,但从来没有安装它(已经在我的工作计算机上安装)而且我发现很难相信,当ruby on rails背后的整体理念是简单的时候更新它是如此困难。我必须丢失一些东西或者没有使用适当的资源。

我机器上当前版本的ruby是ruby 1.9.2p0(2010-08-18)[i386-mingw32]

$rails --version
Rails 3.0.3

我下载的DevKit是 的devkit-TDM-32-4.5.2-20111229-1559-sfx.exe 来自http://rubyinstaller.org/downloads

然后,我尝试了解此网站https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

上的安装步骤

它总是回到制作'错误或' json'错误。

也许我有不同的版本冲突?

现在,当我尝试启动WEBrick来运行我的应用程序时出现以下错误:

$ rails s
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/rubygems_integrat
ion.rb:183:in `stub_source_index170': uninitialized constant Gem::SourceIndex (N
ameError)
    from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/ruby
gems_integration.rb:303:in `stub_rubygems'
    from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/ruby
gems_integration.rb:246:in `replace_entrypoints'
    from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runt
ime.rb:14:in `setup'
    from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler.rb:1
10:in `setup'
    from c:/rails/thumb/costrecovery/config/boot.rb:8:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from script/rails:5:in `<main>'

非常感谢任何建议。

0 个答案:

没有答案