Forum: Ruby on Rails When I start a rails server and try a test app, changes to controller files arent reflected

E1a04645cf38280dcff5e3e34318bf3a?d=identicon&s=25 Adam (Guest)
on 2014-08-08 09:46
(Received via mailing list)
Hi,

Just starting out with Rails so bear with me.

I was working on a test app and everything was going great. However now
when I run "rails server" and none of the changes to the controller
files
are reflected.

If I make changes to HTML files, those are reflected. And yes, I'm sure
im
in the right directory editing the correct files.

I can get rid of actions in the controller files and it still works
fine.
Do I have to do something after I change the ruby files? I thought I
could
just save them then run 'rails server'... It had seemed to be working
doing
just that previously.

Thanks
F7141e066d691d7f18765c1ea6389b18?d=identicon&s=25 Serguei Cambour (javix)
on 2014-08-08 09:53
(Received via mailing list)
On Friday, August 8, 2014 7:54:01 AM UTC+2, Adam wrote:
> in the right directory editing the correct files.
>
> I can get rid of actions in the controller files and it still works fine.
> Do I have to do something after I change the ruby files? I thought I could
> just save them then run 'rails server'... It had seemed to be working doing
> just that previously.
>
> Thanks
>

You don't have to restart the running server. Just save a modified file
and
refresh your page in the browser (F5 or  CTRL F5 or CMD+R for OS X).
If you still have problems unsolved, post the related code to see what
you
had changed. You can also look your development.log file to see what is
going on.
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2014-08-08 10:03
(Received via mailing list)
On Friday, August 8, 2014 6:54:01 AM UTC+1, Adam wrote:
>
>
> I can get rid of actions in the controller files and it still works fine. Do I
have to do something after I change the ruby files? I thought I could just save
them then run 'rails server'... It had seemed to be working doing just that
previously.
>
>

Have you only been testing deleting actions? If so you might have been
fooled by the fact that you don't have to define a controller method for
an action - as long as there is a template rails will render that
automatically.

Another thing to lookout for is using require to load your
controllers/models - that will confuse the code reloading system (it's
fine to use it for gems, the ruby standard library etc)

Fred.
24f49d448968ea24c8630c31fae12758?d=identicon&s=25 Bala Paranj (Guest)
on 2014-08-18 00:46
(Received via mailing list)
Just starting out with Rails? Read my free book on rails :
www.rubyplus.com/rails.pdf. Once you finish the book you will know how
the
reloading process works and also learn about the controllers, views,
models
and more.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.