Re: Is there any way to update the javascript when I reload the page using rails?

9 views
Skip to first unread message

Frederick Cheung

unread,
May 2, 2013, 8:36:24 AM5/2/13
to rubyonra...@googlegroups.com


On Wednesday, May 1, 2013 8:07:17 PM UTC+1, Miguel Correlo wrote:
 Hi,
I need fix any bugs in a rails project. The problem is every time I change anything in javascript I have to make 
bundle exec rake rails_group=assets assets:clean  RAILS_ENV=development and then
bundle exec rake rails_group=assets assets:precompile  RAILS_ENV=development
and finaly restart the rails server. This way spend 10 min.

I've never needed to do this. If you have precompiled assets in the past then deleting public/assets should result in rails  compiling assets on the fly.

Fred 

Emil S

unread,
May 2, 2013, 7:16:42 AM5/2/13
to rubyonra...@googlegroups.com

You don't need to precompile your assets in development environment. Remove config.assets.compile = false from config/environments/development.rb if it's there. Read this stackoverflow question for a better idea of what happens.



On 2 May 2013 00:37, Miguel Correlo <corr...@gmail.com> wrote:
 Hi,
I need fix any bugs in a rails project. The problem is every time I change anything in javascript I have to make 
bundle exec rake rails_group=assets assets:clean  RAILS_ENV=development and then
bundle exec rake rails_group=assets assets:precompile  RAILS_ENV=development
and finaly restart the rails server. This way spend 10 min.

Exists any other solution?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/29Bs1vd0ERwJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages