Rake tasks inaccessible

Hi

I've been experimenting with Ruby in IDEA on Mac OS X(10.5.2). Im having trouble getting rake to work from within IDEA, the rake contex menu is disabled, and when I use the keyboard shortcut to run db:migrate I get the following:

Rake task 'db:migrate' is inaccessible for module 'RailsModule'

Rake works fine from the commandline, I can run the server and all works fine apart from rake not being accessible from within IDEA.

All and any ideas appreciated.

-Gulli

0
Avatar
Permanently deleted user

Hi!

Please remove .rakeTasks file from your project? It contains all the rake tasks available for you module.
It will be recreated automatically after project opened.

-


Regards,
Oleg

0
Avatar
Permanently deleted user

I already tried that, unfortunately this does not help. I tried it again just to be sure, still does not help. This is the content of the .rakeTasks after deleting the file and restarting IDEA:

]]>


Regards

-Gudlaugur

0
Avatar
Permanently deleted user

Please try run command "rake --tasks" from your project directory and attach output here, please!

0
Avatar
Permanently deleted user

bash-3.2$ rake --tasks
rake db:abort_if_pending_migrations # Raises an error if there are pending...
rake db:charset # Retrieves the charset for the curren...
rake db:collation # Retrieves the collation for the curr...
rake db:create # Create the database defined in confi...
rake db:create:all # Create all the local databases defin...
rake db:drop # Drops the database for the current R...
rake db:drop:all # Drops all the local databases define...
rake db:fixtures:identify # Search for a fixture given a LABEL o...
rake db:fixtures:load # Load fixtures into the current envir...
rake db:migrate # Migrate the database through scripts...
rake db:migrate:redo # Rollbacks the database one migration...
rake db:migrate:reset # Resets your database using your migr...
rake db:reset # Drops and recreates the database fro...
rake db:rollback # Rolls the schema back to the previou...
rake db:schema:dump # Create a db/schema.rb file that can ...
rake db:schema:load # Load a schema.rb file into the database
rake db:sessions:clear # Clear the sessions table
rake db:sessions:create # Creates a sessions migration for use...
rake db:structure:dump # Dump the database structure to a SQL...
rake db:test:clone # Recreate the test database from the ...
rake db:test:clone_structure # Recreate the test databases from the...
rake db:test:prepare # Prepare the test database and load t...
rake db:test:purge # Empty the test database
rake db:version # Retrieves the current schema version...
rake doc:app # Build the app HTML Files
rake doc:clobber_app # Remove rdoc products
rake doc:clobber_plugins # Remove plugin documentation
rake doc:clobber_rails # Remove rdoc products
rake doc:plugins # Generate documentation for all insta...
rake doc:rails # Build the rails HTML Files
rake doc:reapp # Force a rebuild of the RDOC files
rake doc:rerails # Force a rebuild of the RDOC files
rake log:clear # Truncates all *.log files in log/ to...
rake notes # Enumerate all annotations
rake notes:fixme # Enumerate all FIXME annotations
rake notes:optimize # Enumerate all OPTIMIZE annotations
rake notes:todo # Enumerate all TODO annotations
rake rails:freeze:edge # Lock to latest Edge Rails or a speci...
rake rails:freeze:gems # Lock this application to the current...
rake rails:unfreeze # Unlock this application from freeze ...
rake rails:update # Update both configs, scripts and pub...
rake rails:update:configs # Update config/boot.rb from your curr...
rake rails:update:javascripts # Update your javascripts from your cu...
rake rails:update:scripts # Add new scripts to the application s...
rake routes # Print out all defined routes in matc...
rake secret # Generate a crytographically secure s...
rake stats # Report code statistics (KLOCs, etc) ...
rake test # Run all unit, functional and integra...
rake test:functionals # Run tests for functionalsdb:test:pre...
rake test:integration # Run tests for integrationdb:test:pre...
rake test:plugins # Run tests for pluginsenvironment / R...
rake test:recent # Run tests for recentdb:test:prepare ...
rake test:uncommitted # Run tests for uncommitteddb:test:pre...
rake test:units # Run tests for unitsdb:test:prepare /...
rake tmp:cache:clear # Clears all files and directories in ...
rake tmp:clear # Clear session, cache, and socket fil...
rake tmp:create # Creates tmp directories for sessions...
rake tmp:pids:clear # Clears all files in tmp/pids
rake tmp:sessions:clear # Clears all files in tmp/sessions
rake tmp:sockets:clear # Clears all files in tmp/socket

Here it is.

-gulli

0

>bash-3.2$ rake --tasks

1. Is Ruby SDK is installed and choosen for your rails module?
2. Do you use the same ruby installation for Ruby SDK(thus "rake" executable) and for running "rake --tasks" ?

0
Avatar
Permanently deleted user

I have a single ruby installation (1.8.6), so yes. I am able to run the server and create scaffolds through IDEA, so I would think that the SDK is properly configured.

I haven't had the chance to verify this properly, I'll post an update here if I find any discrepancies.

-Gulli

0

We get list of available tasks by executing "rake --tasks" for module SDK. I suppose problem is in rake script of module SDK.

Try to execute command:
\[full path to ruby SDK\]/bin/ruby \[full path to ruby SDK\]/bin/rake --tasks

0
Avatar
Permanently deleted user

I'm having this same problem, did anyone ever come up with some kind of solution, or figure out what the problem is?

Rob.

MacBook Pro
OSX 10.4.11
IDEA 7.0.4

0
Avatar
Permanently deleted user

I've been having a similar issue for a while now - rake menu disabled. Basically there are two ways I found around it:

1. remove the rails facet and add it again. It refreshes the caches and for some reason it restores the rake tasks.
2. In newer versions goto Tools => Ruby On Rails (ROR plugin in Version 7) => Reload Rake Tasks

The first method didn't persist between starts, so I had to do it again every time I restarted the project.

Hope this helps,

Eran

0

We've found a bug concerned to this problem(for Selena version). Please try updated plugin 1.5.20660.

0

请先登录再写评论。