How to build the gems task: install

I am deploying a rails application on a linux server, and I have some of the rake tasks that are not used in the rake rake: install and rake db

I run rails 2.3.4 from GEM.

Why is this?

How to fix it? can i update somehow?


they are not on the rake -T list

rake apache2 # Build Apache 2 module rake clean # Remove compiled files rake clobber # Remove all generated files rake default # Build everything rake doc # Generate all documentation rake doxygen # Generate Doxygen C++ API documentation if ... rake doxygen:clobber # Remove generated Doxygen C++ API documenta... rake doxygen:force # Force generation of Doxygen C++ API docume... rake fakeroot # Create a fakeroot, useful for building nat... rake nginx # Build Nginx helper server rake package # Build all the packages rake package:clean # Remove package products rake package:debian # Create a Debian package rake package:force # Force a rebuild of the package files rake package:gem # Build the gem file passenger-2.2.4.gem rake rdoc # Build the rdoc HTML Files rake rdoc:clobber # Remove rdoc products rake rdoc:force # Force a rebuild of the RDOC files rake sloccount # Run 'sloccount' to see how much code Passe... rake test # Run all unit tests and integration tests rake test:cxx # Run unit tests for the Apache 2 and Nginx ... rake test:integration # Run all integration tests rake test:integration:apache2 # Run Apache 2 integration tests rake test:integration:nginx # Run Nginx integration tests rake test:oxt # Run unit tests for the OXT library rake test:rcov # Run coverage tests for the Ruby libraries rake test:restart # Run the 'restart' integration test infinit... rake test:ruby # Run unit tests for the Ruby libraries 

my rake file contains the following:

 # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require(File.join(File.dirname(__FILE__), 'config', 'boot')) require 'rake' require 'rake/testtask' require 'rake/rdoctask' require 'tasks/rails' 

How to add gram and db rake tasks? and why are they missing?

+4
source share
5 answers

What is the conclusion of rake -T ? This should contain a list of all possible tasks. In the RoR application, Rakefile defines your tasks.

You can update gems using gem update .

+6
source

Check your Capfile if you really use gems: install from Capistrano. Apparently, the way to do this is to make sure that you are in the correct directory inside when starting Capistrano.

 namespace :gems do desc "Install gems" task :install, :roles => :app do run "cd #{current_path} && #{sudo} rake RAILS_ENV=production gems:install" end end 

You can also always specify a rakefile using the -f [FILE] option before the rake command.

+4
source

You can try updating the Rails installation or reinstalling the rails by passing the --force flag. Do you have other projects for which this team works? Check the rake files from these projects. It looks like your rakefile is the same as mine, though ... Is this project originally based on an old version of rails? What version of gem are you using? You might need gem update --system . All these are opportunities.

0
source

I suppose you can always recreate your project. Annoying, but always seems to help in the worst case.

At the very least, this will give you an idea of ​​whether the project or something is really in some kind of dependency.

0
source

If you are using the rails application, you also have rake tasks defined in lib / tasks / SOME_TASK.rake

if you define SOME_TASK, it will be displayed when rake -T starts and will be an available command.

0
source

All Articles