Open bborn opened 13 years ago
+1 I've got a ticket filed with Heroku.
Any update on that issue?
+1 same issue here
Never mind. I found a workaround: Just update your config/production.rb
to say:
config.serve_static_assets = true
For example: https://github.com/codeforamerica/adopt-a-hydrant/commit/2e14d25e94aec73d2ac5013b44281a387217a2cb
Yes that works fine. Also, Rack must be a gem when deploying to Heroku. That means that the GIT version of Rails will fail, but the recently released gem version of Rails 3.1.0beta1 will work.
How does it work for you, Mathieu? I'm always getting errors, independent of the config.serve_static_assets setting ...
@clements What error are you getting? (check heroku logs
)
The same as the ticket opener:
2011-05-08T20:05:00+00:00 app[web.1]: /app/vendor/plugins/rails3_serve_static_assets/init.rb:1:in block in <class:Plugin>': undefined method
configure' for Rails::Application:Class (NoMethodError)
What Heroku stack are you running on?
If it's anything other than bamboo-mri-1.9.2
, you'll need to type:
heroku stack:migrate bamboo-mri-1.9.2
and the redeploy.
Yeah, I'm running on bamboo with 1.9.2.
On 08.05.2011, at 22:13, sferik reply@reply.github.com wrote:
What Heroku stack are you running on?
If it's anything other than
bamboo-mri-1.9.2
, you'll need to type:heroku stack:migrate bamboo-mri-1.9.2
and the redeploy.
Reply to this email directly or view it on GitHub: https://github.com/pedro/rails3_serve_static_assets/issues/1#comment_1120127
I've tried using this as a plugin and manually changing it to use the new API. The app can then start up but I keep getting 500s because of SystemStackErrors. The interesting part is that Heroku keeps telling me that Rails is not configured to serve static assets although I've adapted the production config and I've double checked that Rails is in fact running in the production environment.
with the following config/environments/production.rb: https://gist.github.com/962259
and the following Gemfile: https://gist.github.com/962252
and bamboo-mri-1.9.2 in heroku info
, I am able to deploy to Heroku just fine:
-----> Heroku receiving push
-----> Rails app detected
-----> Configure Rails 3 to disable x-sendfile
Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
Thanks, Mathieu. That solved the problem with static assets. I've now also managed to find the problem with the SystemStackError: I was using i18n fallbacks manually and the Rails setting somehow caused infinite recursion ... :-(
I get: