Ruby on Rails
Friday, February 13, 2015
On Friday, February 13, 2015 at 11:26:23 AM UTC+2, Colin Law wrote:
On 13 February 2015 at 09:09, Darius Pakusas <dar...@pakusas.lt> wrote:
> Hi,
>
> I'm newbie in Rails. When I change routes.rb file Rails does not reload it,
> means /rails/info/routes shows same old routes and rake routes shows new. If
> I stop rails server and start again, it shows new routes. If I rename
> routes.rb files I get an exception routes.rb not found.
Yes, that is the way it works. If you change routes.rb you need to
restart the server.
Even in development? On the web I find older resources saying routes.rb also is reloaded if file is changed.
>
> If I create new controller, change view and other files in app, I can see
> result in browser immediately, means rails reloads that code.
>
> I'm using docker if it is important, Dockerfile:
> FROM ruby:2.2.0
>
> RUN apt-get update && apt-get install -y nodejs --no-install-recommends &&
> rm -rf /var/lib/apt/lists/*
> RUN apt-get update && apt-get install -y mysql-client postgresql-client
> sqlite3 --no-install-recommends && rm -rf /var/lib/apt/lists/*
>
> RUN bundle config --global frozen 1
>
> RUN mkdir -p /usr/src/app
> WORKDIR /usr/src/app
>
> COPY Gemfile /usr/src/app/
> COPY Gemfile.lock /usr/src/app/
>
> RUN bundle install
>
> EXPOSE 3000
> CMD ["rails", "server", "-b", "0.0.0.0"]
I don't understand your point about why it is important in this case.
Please clarify.
It is really not inportant in this case. My thought was maybe Rails check if file was changed does not work because it is in container or something like that.
Darius
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a2411463-6e70-441a-b10a-f861c0e3d590%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment