Lost Abilility To Generate Controllers

I submitted a suport ticket last week, but am hoping the community can provide a faster answer.

My RubyMine installation has lost the ability to generate controllers. Also ctrl-alt-g,c does nothing. I've just upgared RubyMine to 2.0.1 but the problem is still here. Any ideas how I can get this back?

By the way, Relad Generators has never worked for me. Not sure if it's related. This is what I get:


/home/brandon/projects/rails_apps/loudcity/script/generate
    Error:Error:Parsing error. Unknown data format.
stdout:
[Errno::ECONNREFUSED: Connection refused - connect(2)
Usage: script/generate generator [options] [args]
Rails Info:
    -v, --version                    Show the Rails version number and quit.
    -h, --help                       Show this help message and quit.
General Options:
    -p, --pretend                    Run but do not make any changes.
    -f, --force                      Overwrite files that already exist.
    -s, --skip                       Skip files that already exist.
    -q, --quiet                      Suppress normal output.
    -t, --backtrace                  Debugging: show backtrace on errors.
    -c, --svn                        Modify files with subversion. (Note: svn must be in path)
    -g, --git                        Modify files with git. (Note: git must be in path)


Installed Generators
  Plugins (vendor/plugins): a13g_test_harness, daemon, filter, processor, tracer
  Rubygems: technicalpickles-shoulda, action_mailer_tls, clearance, clearance_features, clearance_views, cucumber, feature, formtastic_stylesheets, hoptoad, install_rubigen_scripts, integration_spec, paperclip, rspec, rspec_controller, rspec_model, rspec_scaffold, session, shoulda_model, shoulda_scaffold, vulcanize
  Builtin: controller, helper, integration_test, mailer, metal, migration, model, observer, performance_test, plugin, resource, scaffold, session_migration

More are available at http://wiki.rubyonrails.org/rails/pages/AvailableGenerators
  1. Download, for example, login_generator.zip
  2. Unzip to directory /home/brandon/.rails/generators/login
     to use the generator with all your Rails apps
     or to /home/brandon/projects/rails_apps/loudcity/lib/generators/login
     to use with this app only.
  3. Run generate with no arguments for usage information
       script/generate login

Generator gems are also available:
  1. gem search -r generator
  2. gem install login_generator
  3. script/generate login

]
stderr:
[]
Error message:
java.lang.Error: Error: could not match input

7 comments
Comment actions Permalink

I noticed there is a file .idea/.generators

It contains all the generators RubyMine should be using. Controller is in there. Why can't RubyMine generate a controller?

0
Comment actions Permalink

Hello Brandon

By the way, Relad Generators has never worked for me. Not sure if it's related. This is what I get:


/home/brandon/projects/rails_apps/loudcity/script/generate
    Error:Error:Parsing error. Unknown data format.
stdout:
....

Most likely it is a bug in generators output parser, I've filed an issue - http://youtrack.jetbrains.net/issue/RUBY-5709

I noticed there is a file .idea/.generators

It contains all the generators RubyMine should be using. Controller is in there. Why can't RubyMine generate a controller?

RubyMine keeps list of available generators in this file. Should work.. And what exactly do you do to generate a controller?

0
Comment actions Permalink

Any method for generating a controller from the IDE does not work. Controller isn't even an option from the shortcut menu in the project explored.

0
Comment actions Permalink

Is "rspec" gem activated in RubyMine's gem manager?

0
Comment actions Permalink

rspec provides special rspec generators for rails controllers, models, etc. -  rspec, rspec_controller, rspec_model, rspec_scaffold. Thus if gem is attached RubyMine removes standard rails mode/controller/scaffold generators and vice versa. Thus workaround for you will be
* close RubyMine
* add rspec controllers to .idea/.generators file
* save file and launch RubyMine
Now rspec controllers should be visible in your project

0
Comment actions Permalink

fix will be available in 2.0.2 update

0

Please sign in to leave a comment.