Ruby on Rails サイトをセットアップしようとするとエラーが発生します。これまで Ruby を使用したことがないので、インストーラーからすべてが削除されます。
Ruby 1.9.3 と RubyGems 2.0.3 をインストールしました。次に、 を使用してレールをインストールしgem
、 で空のサイトを作成しましたrails new
。ある時点で、ここで指示されているように DevKit もインストールしました。正確な時期は思い出せませんが、ある時点で明示的に要求されました。次に、を使用して起動しようとしましたが、不足している宝石をインストールするrails server
ために使用するように求められます。bundle install
簡単ですが、試してみると、次の出力が得られます。
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.0.4)
Using i18n (0.6.1)
Using multi_json (1.7.3)
Using activesupport (3.2.13)
Using builder (3.0.4)
Using activemodel (3.2.13)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.2)
Using tilt (1.4.1)
Using sprockets (2.2.2)
Using actionpack (3.2.13)
Using mime-types (1.23)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.5.3)
Using actionmailer (3.2.13)
Using arel (3.0.2)
Using tzinfo (0.3.37)
Using activerecord (3.2.13)
Using activeresource (3.2.13)
Using bundler (1.3.5)
Using coffee-script-source (1.6.2)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.3)
Installing json (1.7.7)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
"C:/Ruby/Ruby 1.9.3/bin/ruby.exe" extconf.rb
C:/Ruby/Ruby 1.9.3/bin/ruby.exe: invalid option -1 (-h will show valid options) (RuntimeError)
Gem files will remain installed in C:/Ruby/Ruby 1.9.3/lib/ruby/gems/1.9.1/gems/json-1.7.7 for inspection.
Results logged to C:/Ruby/Ruby 1.9.3/lib/ruby/gems/1.9.1/gems/json-1.7.7/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.7.7), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.7'` succeeds before bundling.
gem install json -v '1.7.7'
またはどちらかを実行すると、同じエラーが発生しますgem install json
。この特定のエラーは、グーグルに耐性があることが証明されているので、ここで質問してみようと思いました. どんな助けでも大歓迎です!