簡體   English   中英

由於therubyracer gem而導致捆綁安裝錯誤

[英]bundle install error because of therubyracer gem

我正在使用Rails 4.1.4和ruby-2.1.1。 我的Gemfile:

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.4'
# Use mysql as the database for Active Record
gem 'mysql2'

gem 'devise'
gem "paperclip", "~> 4.2"
gem 'aws-sdk'

gem 'bootstrap-sass-rails'
gem 'bootstrap-datepicker-rails'

gem 'jquery-tokeninput-rails'

gem 'carmen-rails'

gem 'will_paginate'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# 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'
gem 'jquery-ui-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', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring',        group: :development

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use debugger
gem 'byebug'
# gem 'debugger', group: [:development, :test]

# group :production do
#   gem "rails_12factor"
#   gem "activerecord-postgresql-adapter"
#   gem 'pg'
# end

gem 'activemerchant'

但是每當我運行bundle install命令Rubymine時

Gemfile:29: syntax error, unexpected ':', expecting $end
gem 'therubyracer',  platforms: :ruby

我該怎么辦? 如果我注釋掉“ therubyracer”寶石。 然后,此錯誤顯示sdoc gem。

嘗試這個:

gem 'therubyracer', :platform => :ruby 

從錯誤回溯中可以看到,您已經安裝了Ruby 1.8(默認操作系統)。 Ruby on Rails 4.1至少需要Ruby 1.9.3。 因此,您可以使用RVM安裝較新的Ruby版本。 然后,您將能夠安裝所有必需的gem。 推薦使用RVM或rbenv來管理紅寶石。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM