I’m using Rails 3.2 and have this as a Gemfile:
gem 'rails', '3.2.11'
group :development do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.11.0'
end
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
gem 'jquery-rails', '2.0.2'
gem 'coffee-script'
group :test do
gem 'capybara', '1.1.2'
end
group :production do
gem 'pg', '0.12.2'
gem 'therubyracer-heroku', '~> 0.8.1.pre3'
end
My webapp runs fine on localhost, but it’s not working on Heroku because of a coffeescript file. I’m on Heroku Cedar if that helps in any way. I looked at the source in the Heroku webapp, and it doesn’t look like my cofeescript was compiled into the minified javascript that Heroku does. How do I get that coffeescript to compile on Heroku? What am I doing wrong?
We’d need to know a lot more about your application to check every possibility.
A good place to start to would be
rake assets:precompileand ensure you can run that locally. It’s the command Heroku is going to run – or should if things are set up properly.To get farther, I suggest you read up on the asset pipeline on Heroku and make sure you are “crossing your t’s and dotting your i’s”
If you still have trouble, you may be able to edit this question with more specific information.