Monday 29 April 2013

how to run a scheduler.rake file in rails?



If you don't see your command in the response list then it is not well formed or just does not have description. So you need to investigate your rake file. Rake tasks files have similar structure, like:

namespace :some_task do

  task :do_some_work => :environment do
    # Code goes here
  end

  desc 'Do some other work'
  task :do_something => :environment do
    # Code goes here
  end

end

#first task
rake some_task:do_some_work

#second task
rake some_task:do_something

Sometimes there could be no namespace and then tasks could be executed just using rake command and name of the task as first argument.

Tuesday 23 April 2013

ruby installation is missing psych (for yaml output).



Problem it seems your ruby installation is missing psyh (for yaml output).centos solution curl -O http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/atomic-release-1.0-14.el6.art.noarch.rpm sudo rpm -Uvh atomic-release-1.0-14.el6.art.noarch.rpm sudo yum install libyaml-devel rvm reinstall 1.9.3-p194