johnnybutler7
2012-Jan-17 15:30 UTC
Rails 3.1 compress assets production fails when compress is set to true
Hi, I can deploy to staging fine. When i try and deploy to production i get the following error below, it gets so far and then bombs out. RAILS_ENV=production bundle exec rake assets:precompile --trace mkdir -p /var/www/rails/workstars/site/releases/20120117151339/public/ assets/vouchers mkdir -p /var/www/rails/workstars/site/releases/20120117151339/public/ assets rake aborted! undefined method `bytesize'' for nil:NilClass I have narrowed it down to this piece of code which is enabled in production.rb config.assets.compress = true Anyone got any ideas, im a bit lost at this stage, JB -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Xuan
2012-Jan-20 11:40 UTC
Re: Rails 3.1 compress assets production fails when compress is set to true
On 17 ene, 16:30, johnnybutler7 <johnnybutl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I can deploy to staging fine. > > When i try and deploy to production i get the following error below, > it gets so far and then bombs out. > > RAILS_ENV=production bundle exec rake assets:precompile --trace > > mkdir -p /var/www/rails/workstars/site/releases/20120117151339/public/ > assets/vouchers > mkdir -p /var/www/rails/workstars/site/releases/20120117151339/public/ > assets > rake aborted! > undefined method `bytesize'' for nil:NilClass > > I have narrowed it down to this piece of code which is enabled in > production.rb > > config.assets.compress = true > > Anyone got any ideas, im a bit lost at this stage, > > JBI had a similar issue just today, which was solved by adding to config/ environments/production.rb the following: config.assets.precompile += %w(... rails_admin/rails_admin.js rails_admin/rails_admin.css) Hope it helps if you still face this problem. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Neener54
2012-Jan-20 15:23 UTC
Re: Rails 3.1 compress assets production fails when compress is set to true
Also keep in mind that you''ll need to make sure the debug option is off otherwise it will force it to render individual assets. On Jan 17, 8:30 am, johnnybutler7 <johnnybutl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I can deploy to staging fine. > > When i try and deploy to production i get the following error below, > it gets so far and then bombs out. > > RAILS_ENV=production bundle exec rake assets:precompile --trace > > mkdir -p /var/www/rails/workstars/site/releases/20120117151339/public/ > assets/vouchers > mkdir -p /var/www/rails/workstars/site/releases/20120117151339/public/ > assets > rake aborted! > undefined method `bytesize'' for nil:NilClass > > I have narrowed it down to this piece of code which is enabled in > production.rb > > config.assets.compress = true > > Anyone got any ideas, im a bit lost at this stage, > > JB-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.