Type : crontab -e
Then we can mention our command
# m h dom mon dow command
*/15 * * * * /deploy/project/cronjobs/alert.sh (Path file for where we have that sh file)
This will run for every 15 minute.
Example for run the rake task:
----------------------------------------------------
In the sh file we need to write the following details,
open the alert.sh and type the following
cd /home/deploy/applicationdirectory
/usr/bin/rake alerts
here this is the script for running the alerts tasks
Friday, August 21, 2009
Upgrading rails application from old version to Lastest version.Up
For Ex: Our old rails application is rails 1.2.6 or less than recent version.
Then what we need to do is go to the application directory
Ex: gousalya@home-desktop:~/project/mormonlore$ rails .
exists
exists app/controllers
exists app/helpers
exists app/models
exists app/views/layouts
exists config/environments
exists config/initializers
create config/locales
exists db
exists doc
exists lib
exists lib/tasks
exists log
exists public/images
exists public/javascripts
exists public/stylesheets
exists script/performance
exists test/fixtures
exists test/functional
exists test/integration
create test/performance
exists test/unit
exists vendor
exists vendor/plugins
exists tmp/sessions
exists tmp/sockets
exists tmp/cache
exists tmp/pids
overwrite Rakefile? (enter "h" for help) [Ynaqdh] y
force Rakefile
overwrite README? (enter "h" for help) [Ynaqdh] y
force README
create app/controllers/application_controller.rb
overwrite app/helpers/application_helper.rb? (enter "h" for help) [Ynaqdh] n
skip app/helpers/application_helper.rb
overwrite config/database.yml? (enter "h" for help) [Ynaqdh] n
skip config/database.yml
overwrite config/routes.rb? (enter "h" for help) [Ynaqdh] n
skip config/routes.rb
create config/locales/en.yml
create config/initializers/backtrace_silencers.rb
overwrite config/initializers/inflections.rb? (enter "h" for help) [Ynaqdh] n
skip config/initializers/inflections.rb
identical config/initializers/mime_types.rb
create config/initializers/new_rails_defaults.rb
create config/initializers/session_store.rb
overwrite config/environment.rb? (enter "h" for help) [Ynaqdh] y
force config/environment.rb
overwrite config/boot.rb? (enter "h" for help) [Ynaqdh] y
force config/boot.rb
overwrite config/environments/production.rb? (enter "h" for help) [Ynaqdh] y
force config/environments/production.rb
overwrite config/environments/development.rb? (enter "h" for help) [Ynaqdh] y
force config/environments/development.rb
overwrite config/environments/test.rb? (enter "h" for help) [Ynaqdh] y
force config/environments/test.rb
overwrite script/about? (enter "h" for help) [Ynaqdh] y
force script/about
overwrite script/console? (enter "h" for help) [Ynaqdh] y
force script/console
Now our application is migrated to recent version.
Then what we need to do is go to the application directory
Ex: gousalya@home-desktop:~/project/mormonlore$ rails .
exists
exists app/controllers
exists app/helpers
exists app/models
exists app/views/layouts
exists config/environments
exists config/initializers
create config/locales
exists db
exists doc
exists lib
exists lib/tasks
exists log
exists public/images
exists public/javascripts
exists public/stylesheets
exists script/performance
exists test/fixtures
exists test/functional
exists test/integration
create test/performance
exists test/unit
exists vendor
exists vendor/plugins
exists tmp/sessions
exists tmp/sockets
exists tmp/cache
exists tmp/pids
overwrite Rakefile? (enter "h" for help) [Ynaqdh] y
force Rakefile
overwrite README? (enter "h" for help) [Ynaqdh] y
force README
create app/controllers/application_controller.rb
overwrite app/helpers/application_helper.rb? (enter "h" for help) [Ynaqdh] n
skip app/helpers/application_helper.rb
overwrite config/database.yml? (enter "h" for help) [Ynaqdh] n
skip config/database.yml
overwrite config/routes.rb? (enter "h" for help) [Ynaqdh] n
skip config/routes.rb
create config/locales/en.yml
create config/initializers/backtrace_silencers.rb
overwrite config/initializers/inflections.rb? (enter "h" for help) [Ynaqdh] n
skip config/initializers/inflections.rb
identical config/initializers/mime_types.rb
create config/initializers/new_rails_defaults.rb
create config/initializers/session_store.rb
overwrite config/environment.rb? (enter "h" for help) [Ynaqdh] y
force config/environment.rb
overwrite config/boot.rb? (enter "h" for help) [Ynaqdh] y
force config/boot.rb
overwrite config/environments/production.rb? (enter "h" for help) [Ynaqdh] y
force config/environments/production.rb
overwrite config/environments/development.rb? (enter "h" for help) [Ynaqdh] y
force config/environments/development.rb
overwrite config/environments/test.rb? (enter "h" for help) [Ynaqdh] y
force config/environments/test.rb
overwrite script/about? (enter "h" for help) [Ynaqdh] y
force script/about
overwrite script/console? (enter "h" for help) [Ynaqdh] y
force script/console
Now our application is migrated to recent version.
Skip Migration
To skip the Migration:
use --skip-migration
For Ex: script/generate model modelname --skip-migration
use --skip-migration
For Ex: script/generate model
Subscribe to:
Posts (Atom)