Full support for Rake in non-Rails projects

I have created a Rakefile in project root directory for a none Rails project, but I can not run the task. Alt+Shift+R, popup menu,  all do not work. I make something wrong?

Rakefile


require 'rake'

task :default => [:test]

task :test do
    name = "Hi master"
    puts name
end





Attachment(s):
rake_run.PNG
0

Hi,

RubyMine displays only tasks with descriptions, i.e list of tasks which is provided by "rake -T". So

1. add description


...

desc "my test task"
task :test do
    name = "Hi master"

...



2. ask RubyMine to reload list of tasks: Main Menu | Tools | Ruby On Rails | Reload Rake Tasks

0

I'm trying to do this from a non-Ruby project as well and this doesn't seem to work. For one, the "Reload Rake Tasks" menu item is grayed out. I'm finding rake to be a good automation tool for non-Ruby projects, so I'd love to be ale to use it from whatever project type I happen to be working on. Is this possible?

Regards,
Eric

0

Hi Eric,

Which version of RubyMine do you use? Reload rake task my be disabled if "Rakefile" doesn't located in your project root directory. How many content root does your project have(by default - one)?

0

Hi Roman. Sorry for the late reply. Insead of using a Rake task, I just created a Ruby script (deploy.rb) that I run. It's working fine, so I haven't gone back to experiment further with the Rake task.

0

Ok but if you decide to return to rake tasks I will look forward to hearing your feedback.

0

请先登录再写评论。