0

无论“heroku run ...”是什么,我总是会收到以下错误:

/usr/bin/env: ruby​​1.9.1: 没有这样的文件或目录

如下:

user@box:~/path$ heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.7070
/usr/bin/env: ruby1.9.1: No such file or directory

这是版本:

user@box:~/path$ heroku run ruby -v
Running `ruby -v` attached to terminal... up, run.8039
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]

这是我的 Gemfile

source 'https://rubygems.org'

gem 'rails', '4.0.0'

ruby "1.9.3"

gem 'rails_12factor'

gem 'pg'

group :production do
  gem 'therubyracer-heroku',  '0.8.1.pre3'
end

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# 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 'turbolinks'

gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end
4

1 回答 1

1

在你的 Gemfile 上试试这个

source 'https://rubygems.org'

gem 'rails', '3.2.13'
gem 'bootstrap-sass', '2.1'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.6'
gem 'jquery-rails', '2.0.2'

group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.11.0'
  gem 'guard-rspec', '1.2.1'
  gem 'guard-spork', '1.2.0'
  gem 'childprocess', '0.3.6'
  gem 'spork', '0.9.2'
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'
end

group :test do
  gem 'capybara', '1.1.2'
  gem 'factory_girl_rails', '4.1.0'
  gem 'cucumber-rails', '1.2.1', :require => false
  gem 'database_cleaner', '0.7.0'
  # gem 'launchy', '2.1.0'
  # gem 'rb-fsevent', '0.9.1', :require => false
  # gem 'growl', '1.0.3'
end

group :production do
  gem 'pg', '0.12.2'
end
于 2013-07-12T11:12:26.560 回答