RubyMine is showing the error message: "Error running Development: MyProject: Rails 3.x launcher script was found instead of Rails 4.x one"

StackOverflow https://stackoverflow.com/questions/18948883

Question

I'm updating my project from Rails 3.2.12 to 4.0.0. I made all necessary corrections but when I try to execute my app using RubyMine 5.4 I'm receiving the message below:

Error running Development: MyProject: Rails 3.x launcher script was found instead of Rails 4.x one. You need '/Users/stackoverflowuser/RubymineProjects/MyProject/bin/rails' script to launch Rails server. Please update server launcher according to Rails 4.x documentation.

What am I doing wrong?

Était-ce utile?

La solution

"Hack" solution:

  1. Create a new Rails 4 project: rails new MyTestRails4Project
  2. Copy the bin folder that is within the MyTestRails4Project
  3. Paste bin folder inside the project that has just been migrated to Rails 4

Update

If the first solution doesn't work, as RiPuk suggested:

Run the rake task: rake rails:update

Autres conseils

The accepted answer is a bit of a hack - it sounds like you've not finished the upgrade of your project from Rails 3 -> Rails 4.

First thing to do is to run the rake task that interactively updates various files (environments, configs etc) to Rails 4:

rake rails:update

Then assuming that you want to use Spring (of course you do!), run this:

spring binstub --all

it's a problem related to the IDE configutration, one quick solution to this is:

  1. close the project
  2. remove .idea folder
  3. open project
  4. Profit!

if it does not work, try to create a new project (rails new project) and copy the db and app folder from your original project to the new project and create the database using:

rake db:schema:load

I hope this helps.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top