Search code examples
rubyruby-on-rails-3thinrubyminewebrick

Why is my rails development environment not reloading on changes to code?


Each time I make changes to code I have to restart the server or it won't change the output.

I have tried using thin and webrick.

My development.rb file says "config.cache_classes = false".

I am using RubyMine.

Sometimes my view updates, but the models never update.

Anything else you need to know to help me troubleshoot this problem?

EDIT:

I am away from my coding machine right now, but I started thinking. I have a file called makesandwich.rb in app/models directory and app/models/Lesson.rb calls a function in that file. I have been making changes to the makesandwich.rb file and it hasn't been reloading. Do I need to add that file or should it be included automatically in reload?


Solution

  • The problem was that I put a function in a separate file and was editing the function there. This will work fine for production, but for development purposes I put the function back in to the Lesson.rb file and the refreshing started working properly.