0

I'm getting this weird behaviour when running rails server or rails console.

The server/console crashes in various locations in the code throwing this exception:

script/rails:6:in `require': unexpected break (LocalJumpError)
from script/rails:6:in `<main>'

I must note that this behaviour happens to only one more person in my team, all other members of my team does not experience this behaviour and also production server is working just fine with no crashes like this.

Also, we found putting debugger somewhere in the code and just pressing continue solves this problem. But this is hardly a logic way to deal with this bug.

Does anyone experienced similar behaviour and knows how to solve this?

Nithin
  • 3,679
  • 3
  • 30
  • 55
Liron
  • 111
  • 1
  • 5

1 Answers1

0

I have not enough information to provide a 100% sure solution, but here is my guess :

Try to use bundle exec rails <command> rather than script/rails <command>. Rails script doesn't have changed for some time, but it may just be you're not loading the correct gem dependencies.

It would be interesting to know if the other person of your team getting the problem is using script/rails too. If all other people having no problem use the rather idiomatic bundle exec rails, you have a good clue for a dependency version problem.

kik
  • 7,867
  • 2
  • 31
  • 32