ruby-on-rails – Heroku:没有找到Rakefile(但在本地工作)
发布时间:2020-12-16 22:41:38 所属栏目:百科 来源:网络整理
导读:我使用Rails 3.1.3克隆了我自己的应用程序,在Heroku上的堆栈雪松上创建了一个应用程序,将其推送到Heroku,然后尝试运行 heroku运行rake db:migrate并得到此错误消息 No Rakefile found (looking for: rakefile,Rakefile,rakefile.rb,Rakefile.rb)/usr/local/
我使用Rails 3.1.3克隆了我自己的应用程序,在Heroku上的堆栈雪松上创建了一个应用程序,将其推送到Heroku,然后尝试运行
heroku运行rake db:migrate并得到此错误消息 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> 当我运行rake db:migrate时,我在应用程序的根目录.该应用程序在本地主机上工作. 任何想法我可能做错了什么? 我唯一注意到,似乎奇怪的是,在错误消息中,它指的是ruby / 1.9.1 / 但是,我创建了使用rvm与ruby 1.9.2的应用程序,当我做ruby -v ruby -v ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0] 我的宝石 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 我的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 解决方法
你必须推到主分支.从上面的评论看,看起来你不是这样做的.
因此,假设您正在主分支中开发应用程序,您可以使用简单的部署: git push heroku master 如果您没有在主部署上开发,请执行以下操作: git push heroku your_branch_name:master 将your_branch_name替换为您正在使用的分支的名称. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |