【问题标题】:Git Push Heroku Master - Failing?Git Push Heroku Master - 失败?
【发布时间】:2014-10-26 12:53:18
【问题描述】:

所以我尝试将此应用推送到 heroku:

https://github.com/harrystech/prelaunchr    

我在 ubuntu 中使用 virtualbox。

我使用这个安装了 ruby​​:

$ sudo apt-get install curl   # Required
$ curl -L get.rvm.io | bash -s stable   # Get RVM
$ source ~/.bashrc   # Reboot the shell
$ rvm requirements   # To get the command below
$ sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-   core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion  # Install Libraries
$ rvm install 1.9.3   # Install ruby v1.9.3
$ rvm use 1.9.3
$ gem install rails   # Install rails (I had to run this command twice. Error trying to find railties the first time.. weird)    

但是,当我创建我的 heroku 应用程序并尝试将应用程序推送到它时,它给了我这个错误:

http://pastebin.com/uF5PUsCM

对于我安装了 postgresql 的数据库(虽然不知道它是否有任何相关性)

【问题讨论】:

  • 'git remote' 的结果是什么?当您使用 Heroku CLI 客户端创建应用程序时,它会添加一个您将推送到的“远程”。这来自您的本地机器而不是来自 GitHub。

标签: ruby-on-rails git heroku


【解决方案1】:

假设 git push heroku 确实推送到 heroku(git remote -v 会确认),错误消息是:

   Running: rake assets:precompile
   DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb.
   rake aborted!
   refer/cream-tooltip@2x.png isn't precompiled

你可以在“Ruby on Rails Rake assets:precompile error”和this issue找到一些建议:

打开config/environments/production.rb 并确保以下选项设置为true:

# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
config.serve_static_assets = true

然后运行:

rake assets:precompile --trace RAILS_ENV=production

Check also your gems.

【讨论】:

  • 嘿,谢谢你的帮助。我做了你说的一切,但是当我运行最后一个命令时(rake assets:...):我收到以下错误:/usr/local/bin/rake:23:in load': cannot load such file -- /usr/share/rubygems-integration/1.9.1/gems/rake-10.0.4/bin/rake (LoadError) from /usr/local/bin/rake:23:in
    '
猜你喜欢
  • 1970-01-01
  • 2013-03-21
  • 2021-05-19
  • 2013-09-05
  • 1970-01-01
  • 1970-01-01
  • 2018-07-31
  • 2015-08-12
  • 2011-05-23
相关资源
最近更新 更多