[英]All Heroku Commands Are Broken due to Ruby Version
Everytime I run a heroku command I receive this error: 每次我运行heroku命令时,都会收到此错误:
Your Ruby version is 1.9.3, but your Gemfile specified 2.1.2
This has been happening since I pushed several changes (adding sidekiq and making changes to my clock.rb file, also: a new model I need to migrate the db for) 自从我推送了几处更改以来,这种情况一直在发生(添加sidekiq并对我的clock.rb文件进行更改,此外:我需要为其迁移数据库的新模型)
Does anyone know why this might be happening? 有谁知道为什么会这样? It only started after I added ruby '2.1.2' to the gemfile.
它仅在我将ruby'2.1.2'添加到gemfile之后才开始。 But before that I was getting this funky segmentation fault error .
但是在此之前,我遇到了这种时髦的细分错误 。
Here's my gemfile: 这是我的gemfile:
source 'https://rubygems.org'
ruby '2.1.2'
gem 'rails', '4.1.1'
gem 'pg'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'clockwork'
gem 'httparty'
gem 'omniauth-facebook'
gem 'parse-ruby-client'
gem 'parse_resource', '~> 1.8.0'
gem 'stripe', :git => 'https://github.com/stripe/stripe-ruby'
gem 'sidekiq'
gem 'foundation-rails'
group :development, :test do
gem 'pry-rails'
gem 'rspec-rails'
gem 'factory_girl_rails'
gem 'shoulda-matchers'
gem 'valid_attribute'
gem 'capybara'
gem 'dotenv-rails'
gem 'better_errors'
gem 'binding_of_caller'
end
group :production do
gem 'rails_12factor'
gem 'thin'
end
It's seems to related bundler issue. 似乎与捆绑器问题有关。 Go through here https://github.com/sstephenson/rbenv/issues/400 same sort of issue also here get fixed with :
在这里浏览https://github.com/sstephenson/rbenv/issues/400同样的问题也在这里得到解决:
# Rakefile
task :freedom do
Bundler.with_clean_env { sh "heroku" }
end
Hope this help you! 希望这对您有所帮助!
I had two applications using Ruby. 我有两个使用Ruby的应用程序。 In your terminal, change to the directory of the application, then check the Ruby version you are using.
在终端中,转到应用程序的目录,然后检查您正在使用的Ruby版本。 Update it appropriately.
适当更新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.