I'm having problems with running my application on Heroku. It always shows me this error:
https://gist.github.com/902104
I think that is an impor开发者_开发技巧tant line here, that is:
2011-04-04T10:50:59-07:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require': /app/app/models/gallery.rb:5: syntax error, unexpected ':', expecting kEND (SyntaxError)
But my gallery.rb file is ok, here it is:
class Gallery < ActiveRecord::Base
has_many :gallery_photos
accepts_nested_attributes_for :gallery_photos
belongs_to :content
end
So what's going wrong?
Update: here is the warnings of the git push heroku:
warning: You did not specify any refspecs to push, and the current remote
warning: has not configured any push refspecs. The default action in this
warning: case is to push all matching refspecs, that is, all branches
warning: that exist both locally and remotely will be updated. This may
warning: not necessarily be what you want to happen.
warning:
warning: You can specify what action you want to take in this case, and
warning: avoid seeing this message again, by configuring 'push.default' to:
warning: 'nothing' : Do not push anything
warning: 'matching' : Push all matching branches (default)
warning: 'tracking' : Push the current branch to whatever it is tracking
warning: 'current' : Push the current branch
Can you make sure that heroku is using the latest code?
- git status (make sure everything is clean)
- git push heroku (unless it says "already up to date" you were not on latest)
If that still doesn't fix it, then it's likely a text encoding problem, since the gallery.rb file does look fine, then try to get the code as heroku sees it:
git clone -o heroku git@heroku.com:your-app-name.git
This will create a directory called heroku -- go in there and examine the category.rb file.
And if that still fails -- go with Heroku support. They'll help find the problem.
精彩评论