Closed jasonfb closed 13 years ago
I changed from the active_scaffold plugin (which I admit was old) to using this with the gem. Same result (new log output below, you'll notice the active_scaffold is now in a gem not the plugins folder)
What I did to change from a plugin to gem was: Removed the vendor/plugsin/active_scaffold folder entirely (rm -rf), then I committed that.
THen I added this to the bottom of my Gemfile
gem "active_scaffold_vho"
Note that I am using Rails 3.0.7
Looks to me like this writing-to-disk thing is fixed for a "production" environment but not for a "staging" environment. If you're curious, here are the instructions I'm following to set up the same repo to push to two different heroku environments (instances): http://devcenter.heroku.com/articles/multiple-environments
Like I said, the production one works fine but the staging one still has this problem trying to write to the file system
please advise.
Revised Heroku log output below
2011-06-08T16:58:31+00:00 heroku[web.1]: State changed from crashed to created
2011-06-08T16:58:31+00:00 heroku[web.1]: State changed from created to starting
2011-06-08T09:58:32-07:00 heroku[slugc]: Slug compilation finished
2011-06-08T16:58:41+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1263:in initialize': Permission denied - /app/public/blank.html (Errno::EACCES) 2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1263:in
open'
2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1263:in copy_file' 2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1262:in
open'
2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1262:in copy_file' 2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1232:in
copy'
2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:451:in copy_entry' 2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1325:in
traverse'
2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:448:in copy_entry' 2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:423:in
cp_r'
2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1396:in fu_each_src_dest' 2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1405:in
fu_each_src_dest0'
2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1403:in each' 2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1403:in
fu_each_src_dest0'
2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1394:in fu_each_src_dest' 2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:422:in
cp_r'
2011-06-08T16:58:41+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/active_scaffold_vho-3.0.20/lib/active_scaffold_assets.rb:43:in copy_files' 2011-06-08T16:58:41+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/active_scaffold_vho-3.0.20/lib/active_scaffold_assets.rb:5:in
copy_to_public'
2011-06-08T16:58:41+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/active_scaffold_vho-3.0.20/lib/active_scaffold.rb:380
2011-06-08T16:58:41+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:25:in instance_exec' 2011-06-08T16:58:41+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:25:in
run'
2011-06-08T16:58:41+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:50:in run_initializers' 2011-06-08T16:58:41+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:49:in
each'
2011-06-08T16:58:41+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:49:in run_initializers' 2011-06-08T16:58:41+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/application.rb:134:in
initialize!'
2011-06-08T16:58:41+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in send' 2011-06-08T16:58:41+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in
method_missing'
2011-06-08T16:58:41+00:00 app[web.1]: from /app/config/environment.rb:5
2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' 2011-06-08T16:58:41+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require'
2011-06-08T16:58:41+00:00 heroku[web.1]: Process exited
2011-06-08T16:58:42+00:00 heroku[web.1]: State changed from starting to crashed
2011-06-08T16:58:42+00:00 heroku[router]: Error H10 (App crashed) -> GET warm-river-288.heroku.com/ dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-06-08T16:58:42+00:00 heroku[router]: Error H10 (App crashed) -> GET warm-river-288.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0
just set ACTIVE_SCAFFOLD_INSTALL_ASSETS = true for your staging environment
bogus... ACTIVE_SCAFFOLD_INSTALL_ASSETS = false for your stagin environment
Confirmed, that was it
config/environments/staging.rb
MyApp::Application.configure do ACTIVE_SCAFFOLD_INSTALL_ASSETS = false
end
This problem is similar to what I saw in:
https://github.com/vhochstein/active_scaffold/issues/96
However, it is still not working for me. Specifically, it works in a heroku "production" environment, but not in a "staging" environment. Let me be specific, the exact same master branch works fine in my heroku production environment.
Then I setup a staging environment (in the same repo), and pushed the master branch to it:
git push staging master:master
Here's what I'm getting in the Heroku logs when I do that:
2011-06-08T16:29:05+00:00 heroku[web.1]: Starting process with command:
thin -p 52115 -e staging -R /home/heroku_rack/heroku.ru start
2011-06-08T16:29:07+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1263:ininitialize': Permission denied - /app/public/blank.html (Errno::EACCES) 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1263:in
open' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1263:incopy_file' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1262:in
open' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1262:incopy_file' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1232:in
copy' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:451:incopy_entry' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1325:in
traverse' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:448:incopy_entry' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:423:in
cp_r' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1396:infu_each_src_dest' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1405:in
fu_each_src_dest0' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1403:ineach' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1403:in
fu_each_src_dest0' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1394:infu_each_src_dest' 2011-06-08T16:29:07+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:422:in
cp_r' 2011-06-08T16:29:07+00:00 app[web.1]: from /app/vendor/plugins/active_scaffold/install_assets.rb:15:incopy_files' 2011-06-08T16:29:07+00:00 app[web.1]: from /app/vendor/plugins/active_scaffold/install_assets.rb:20 2011-06-08T16:29:07+00:00 app[web.1]: from /app/vendor/plugins/active_scaffold/install_assets.rb:3:in
chdir' 2011-06-08T16:29:07+00:00 app[web.1]: from /app/vendor/plugins/active_scaffold/install_assets.rb:3 2011-06-08T16:29:07+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:inrequire' 2011-06-08T16:29:07+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in
require' 2011-06-08T16:29:07+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:227:inload_dependency' 2011-06-08T16:29:07+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in
require' 2011-06-08T16:29:07+00:00 app[web.1]: from /app/vendor/plugins/active_scaffold/init.rb:15 2011-06-08T16:29:07+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/plugin.rb:81 2011-06-08T16:29:07+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:25:in `instance_exec' 2011-06-08T16:29:07+00:00 heroku[web.1]: Process exited 2011-06-08T16:29:08+00:00 heroku[web.1]: State changed from starting to crashed 2011-06-08T16:29:18+00:00 heroku[router]: Error H10 (App crashed) -> GET warm-river-288.heroku.com/ dyno=none queue=0 wait=0ms service=0ms bytes=0