2012-03-31 11 views
10

ho clonato una delle mie applicazioni utilizzando Rails 3.1.3, creato un app su Heroku sul cedro pila, spinto il a Heroku, e poi provato a correreHeroku: No Rakefile trovato (ma funziona localmente)

heroku run rake db:migrate e ottenuto questo messaggio di errore

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> 

io sono nella radice delle app quando corro rake db:migrate. L'app funziona su localhost.

Tutte le idee che potrei fare male?

L'unica cosa faccio notare che sembra strano è che, nel messaggio di errore, si riferisce a ruby/1.9.1/

Tuttavia, ho creato l'applicazione utilizzando rvm con il rubino 1.9.2 e quando lo faccio ruby -v

ruby -v 
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0] 

mio 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 

mio file gitignore

# 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 
+0

E 'normale che dir si chiama 1.9.1. Qualche possibilità che Rakefile non sia selezionata nel tuo repository? Forse escluso manualmente? – iltempo

+0

Ho postato una copia del mio file gitignore nell'OP. e posso aprire il file rake dalla mia directory app. Tuttavia, non ho idea di come controllare se il file rake è stato trasferito su heroku. lo sai? – Leahcim

+0

bash nel banco di prova e guarda: 'heroku run bash' ' cd/app/' –

risposta

28

devi spingere al ramo master. Osservando i commenti sopra sembra che tu non stia facendo questo.

Pertanto, supponendo che si sta sviluppando l'applicazione nel ramo master, è possibile distribuire con un semplice:

git push heroku master 

Se non si sta sviluppando su Master distribuire con:

git push heroku your_branch_name:master 

sostituendo your_branch_name con il nome del ramo che stai utilizzando.

Problemi correlati