0

私は Rails の初心者です。Hartl Rails チュートリアルを行っており、Railsinstaller でインストールしています。

C:\Sites\sample_app>バンドルの更新

C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/ dsl.rb:7:in instance_eval': C:/Sites/sample_app/Gemfile:43: syntax error, unexp ected $end, expecting keyword_end (SyntaxError) from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler/dsl.rb:7:inevaluate' from C:/RailsInstaller/Ruby1.9.3/ lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler/definition.rb:17:in build' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler.rb:138:indefinition' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1 /gems/bundler-1.0.22 /lib/bundler/cli.rb:262:in update' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler/vendor/thor/task.rb:22:inrun' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 / lib/bundler/vendor/thor/invocation.rb:118:in invoke_task' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler/vendor/thor.rb:263:indispatch' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler/vendor /thor/base.rb:386:in start' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /bin/bundle:13:in' from C:/RailsInstaller/Ruby1.9.3/bin/bundle:19:in load' from C:/RailsInstaller/Ruby1.9.3/bin/bundle:19:in'

これは私のgemfileです。正しいように見えますが、バンドルのインストールで何がエラーになっているのかわかりません。

Source 'https://rubygems.org'

gem 'rails', '3.2.12'

group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.11.0'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails',   '3.2.5'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
gem 'jquery-rails', '2.0.2'
gem 'rb-readline'

group :test do
gem 'capybara', '1.1.2'
end

group :production do
gem 'pg', '0.12.2'
end
4

2 に答える 2

0

sqlite3gemをロードする開発とテストのグループは決して終了しません。おそらくこれであるはずです:

group :development, :test do
    gem 'sqlite3', '1.3.5'
    gem 'rspec-rails', '2.11.0'
end
于 2013-02-20T12:53:26.890 に答える
0

test, developmentとのグループも閉じていませんassets。次のように閉じる必要があります。

group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.11.0'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.5'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
  gem 'jquery-rails', '2.0.2'
  gem 'rb-readline'
end

PS : コードをインデントしたままにしてください。ファイルを一瞥するだけで、閉じられていないタグを見つけるのに役立ちます。:)

于 2013-02-21T05:48:22.777 に答える