tôi nhân bản một trong những ứng dụng của riêng của tôi sử dụng Rails 3.1.3, tạo ra một ứng dụng trên Heroku trên đống tuyết tùng, đẩy để Heroku, và sau đó cố gắng chạyHeroku: Không tìm thấy Rakefile (còn hoạt động tại địa phương)
heroku run rake db:migrate
và nhận được thông báo lỗi này
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/usr/local/lib/ruby/1.9.1/rake.rb:2367:in `raw_load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/local/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/local/bin/rake:31:in `<main>
Tôi đang ở gốc của ứng dụng khi tôi chạy rake db:migrate
. Ứng dụng hoạt động trên localhost.
Bất kỳ ý tưởng nào tôi có thể làm sai?
Điều duy nhất tôi lưu ý rằng có vẻ kỳ lạ là, trong thông báo lỗi, nó đề cập đến ruby/1.9.1/
Tuy nhiên, tôi đã tạo ra ứng dụng sử dụng RVM với ruby 1.9.2 và khi tôi làm ruby -v
ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0]
My Gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
group :production do
gem 'thin'
end
gem "heroku"
gem 'omniauth-facebook'
gem 'omniauth'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.1.5'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
gem "rmagick"
gem "carrierwave"
gem 'fog'
gem 'simple_form'
gem 'devise'
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test do
# Pretty printed test output
gem 'turn', '0.8.2', :require => false
end
tập gitignore tôi
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global
# Ignore bundler config
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp
Thông thường thư mục có tên là 1.9.1. Bất kỳ cơ hội mà bạn Rakefile không được kiểm tra vào kho lưu trữ của bạn? Có thể bị loại trừ theo cách thủ công? – iltempo
Tôi đã đăng một bản sao của tập tin gitignore của tôi trong OP. và tôi có thể mở tập tin rake từ thư mục ứng dụng của mình. Tuy nhiên, tôi không biết làm cách nào để kiểm tra xem tập tin cào đã được đẩy vào heroku chưa. bạn có biết không – Leahcim
bash vào dyno và xem: 'heroku chạy bash' ' cd/app/' –