Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 334
Kevin Baker Avatar asked Nov 10 '10 08:11

Kevin Baker


2 Answers

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>
like image 171
Kristjan Mustkivi Avatar answered Nov 14 '22 12:11

Kristjan Mustkivi


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

like image 2
sameera207 Avatar answered Nov 14 '22 11:11

sameera207