我是網絡開發新手,正在做一個自學學習指導(奧丁項目)。我現在開始安裝編程所需的所有不同工具,但遇到問題。在Heroku部署中爲Rails設置ruby時,出現語法錯誤。我遵循指南http://goo.gl/v2LcbU,當我嘗試執行步驟7.2時(捆綁安裝 - 沒有生產),我得到一個語法錯誤。我運行了ruby -c Gemfile
,錯誤是Gemfile:37: syntax error, unexpected keyword_do, expecting $end
。Ruby on Rails Gemfile錯誤
我已經嘗試了一些東西,但我很困惑,不確定它想說的是什麼與第37行是錯誤的。如果你看指南,我鏈接它已經取代了一些Gemfile,這就是我的Gemfile看起來像是導致錯誤,不允許我bundle install --without production
。
的Gemfile http://i.imgur.com/IIjvhwM.png ,因爲我不知道如何將文件鏈接是否正確呢,對不起,我連接它的映像。
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.4'
# Use sqlite3 as the database for Active Record
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.2'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group
:doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
如果你得到了你的問題的答案,那麼你應該接受答案,否則人們仍然給這個問題的答案。請保持在你的想法@ user3479630 –