Ruby on Rails Thursday, January 30, 2014

Hi all,

I want to run asset precompile task inside the rails application,As I had many dependencies who will change the code,in that case all the time whenever they change i need to run the script as I cant give server access to them so I am providing the GUI for them from that they alone can run the script,so,I have built UI to run the task with some parameter like

     system("Template='#{params[:template]}' Theme='#{params[:theme]}' rake assets:precompile)

I am getting two values from UI(params[:template],params[:theme]).Another thing i want to run this task in another path(site path) means Admin side UI is there that task should execute in Site directory,

 Dir.chdir "#{SITEPATH}" do       `Template="small_business_1" Theme="1" rake assets:precompile`        # system("Template='small_business_1' Theme='1' rake assets:precompile)   end

I have tried this code by putting in controller and lib, but this is not working.

I have tried with shell script also.

Could please anyone can help me.


kingston.s

--
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-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/222bfefa-c86a-4f7c-a638-e8ce06789773%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment