Noel Frostpaw
Noel Frostpaw

Reputation: 4009

Server does not show recent changes

I'm developing a Ruby on Rails project related to semantic technology, and I'm making something basic that allow the uploading of files and searching in those files.

So far it's all working out ok, but I have noticed that when I make changes to my code files or haml files, I don't see those changes on the webserver. Only after either rebooting the server or mashing the F5 button like crazy, the changes come through. And even that is not guaranteed.

The server is running on a local, virtual, ubuntu system. This is an Apache2 webserver configured with Passenger. The website is visibile, it's just not always the latest changes.

Anyone have an idea what might be causing this, or how I can fix this?

Upvotes: 0

Views: 2205

Answers (2)

erickma1
erickma1

Reputation: 1

I was using React in my rails app, I run the following command "yarn build", before running rails server and the changes reflected.

I guess rails s or rails server command doesn't compile JavaScript files

Upvotes: 0

Yule
Yule

Reputation: 9764

In your config/environments/environment_name.rb file it's likely that you have these lines:

  config.cache_classes = true
  config.consider_all_requests_local       = false
  config.action_controller.perform_caching = true

Which you can switch to have the behavior you want. If you don't want to change these then you can just touch tmp/restart, which will push the changes through (it's quicker and more graceful then restarting the web server)

To change the environment passenger runs in add the following line to your vhost:

RailsEnv development

Upvotes: 2

Related Questions