Anonymous: Then I'm missing the menu items, which are specific to a ruby on


Hi,

I have deinstalled my previous idea installations and did a clean install from scratch.

My problem remains: If I create a ruby on rails project, then idea forgets it after a restart

Then I'm missing the menu items, which are specific to a ruby on rails project, like the rake menu item is gray/disabled and the generation items are missing.

This is reproducible. To reproduce to the following:

1. User Debian Etch (newest version)
2. Kernel 2.6.26.1
3. rubygems 1.3.0
4. ruby 1.8.5 (2006-08-25) installed via apt-get
5. IntelliJ 7.0.4 (7941)
6. Go to the plugins menu under settings and download the ruby plugin. Latest version is 1.5 18930
7. JDK to run IntelliJ is jdk1.6.0_05
8. Click on new project
9. Select new project from scratch
10. project name ror
11. Select ruby project
12. Select Ruby SDK 1.8.5
13. Select generate new rails project (Version 1.2.1)

Now the project opens. An Error appears in the Message tab: Error: Get available generators script executes with error:Gem::SourceIndex#search support for Regexp patterns is deprecated /usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/rails_genaerator/lookup.rb:211:in `each' is outdated

However, all the specific menu items for a rails project appear.

14. Close IntelliJ
15. Open the project

Now, all the specific rails menu items, like the rake task and the generator script menu items are missing.

I have tried everything, but more than a uninstalling all old idea installations + configs and installing idea from scratch and installing the plugin is not possible. I'm at a dead end..


Hi,

It seems your installation of ruby is corrupted or some gems have incompatible versions or are out of date.

1. What version of rails do you use (rails 1.2.1 or 2.1.1 or ..) ? Try to update rails gems. Also (see http://www.rubyonrails.org/down) it is recommended to use Rails 2.1 with Ruby 1.8.6


Now the project opens. An Error appears in the Message tab: Error: Get available generators script executes with error:Gem::SourceIndex#search support for Regexp patterns is deprecated /usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/rails_genaerator/lookup.rb:211:in `each' is outdated

2. Try to create rails application from command line and request the list of installed generators ( ./script/generate) Will you get error "Gem::SourceIndex#search support for Regexp patterns is deprecated /usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/rails_genaerator/lookup.rb:211:in `each' is outdated" ?


Now, all the specific rails menu items, like the rake task and the generator script menu items are missing

3. Open project settings, check that Ruby SDK is chosen for your ruby module and ruby module has Rails facet

0
Avatar
Permanently deleted user

Hi,

the Rails Version I'm using is 2.1.1 - sorry for the typo/mistake.

I installed ruby via apt-get and I can run it in the shell - it seems to work fine.

Yes, I do get the same error, when I create an app via the command line :

./script/generate model Car
Gem::SourceIndex#search support for Regexp patterns is deprecated
/usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/rails_generator/lookup.rb:211:in `each' is outdated

The Ruby SDK is chosen in the settings and under Modules I see the facet "Rails"

As I said: If I create a rails app, then I can use it until I restart IntelliJ - I don't think that has something to do with my rails installation.

I installed everything from scratch, including the debian ruby packages, but it's not working. The behaviour is reproduceable.

0
Avatar
Permanently deleted user

My question for you would be: Why is the Rake menu item grayed out/disabled afte the restart. It seems like Intellij recognized part of the plugin, but somehow the menu items disappear or are disabled.

0

Please check files ".generators" and ".raketasks" in your rails application folder. It seems that plugin cannot save this files on disk.

0

To update information about available generators and rake tasks execute actions "Tools|Ruby On Rails|Reload generators" and "Tools|Ruby On Rails|Reload "

0
Avatar
Permanently deleted user

Hi,

thanks for your help!

The files exist and are readable and writeable by the user.

I tried to update the available generators and rake tasks, but the "Tools|Ruby On Rails" menu item is also grayed out/disabled.

0

"Tools|Ruby On Rails" menu item is also grayed out/disabled

These actions are context-sensitive thus your should execute it when some file from your rails module is opened in editor (e.g. any controller class).

0
Avatar
Permanently deleted user

Thanks... that works. The menu items reappear.

How come so, that IntelliJ does not automatically load them when I open the project?!

0
Avatar
Permanently deleted user

Sorry for the double post.

0

The plugin automatically loads cached information from .raketasks and .generators files. If Rakefile was updated or if files .raketasks/.generators don't exist on disk plugin automatically reloads this information. In your case it seems that plugin saved empty generator and rake tasks lists.

We recommend your to try Ruby Plugin 2.0 for IDEA 8.0 (Diana) #8858 EAP (see http://www.jetbrains.net/confluence/display/IDEADEV/DianaEAP). This version isn't available for Selena and contains a lot of improvements (see http://www.jetbrains.net/confluence/display/RUBYDEV/RubyPlugin2.0Release+Notes)

0

请先登录再写评论。