开发者

Why is my Rails erb page not showing changes?

My rails erb view page is not updating with my changes.

开发者_运维问答

I have made changes to my index.html.erb file directly. I restarted the WEBrick. killed -9 all running ruby processes. Clear browser cache, opened page in a different browser. No dice.

Rails 2.3.8 Ruby 1.9.2 gem 1.3.7

I search stackoverflow, found some matches nothing

Any thoughts?


Had exactly the same issue. I found a solution to complement the webserver virthost conf with "RackEnv development":

<VirtualHost *:80>
    ServerName someserver
    DocumentRoot "/path/to/rails/public/"
    RackEnv development

    <Directory "/path/to/rails/">
        AllowOverride all
        Options -MultiViews
    </Directory>
</VirtualHost>


by any chance did you cache enabled. If so in your /public folder you can find static index.html file if so remove it

another symptom would be you have another file with the extension of .erb or .rhtml with the same name. (index.erb or index.rhtml). If so remove it

cheers

sameera


Then your RAILS_ENV environment variable must be set to 'production'. Change it to 'development', that will cause your code to be "re-compiled" on each request. Except if you create a new locale file (like fr.yml), you have to restart your server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜