On 8 March 2016 at 05:14, Donald Ziesig <don...@ziesig.org> wrote:
> Hi All!
>
> Another problem.  I am using Rails 5.0.0.beta3 with a minor javascript file
> (115 lines).  I have encountered the following problem several times in the
> past two days.  In both earlier cases, I ended up returning to the master
> branch and starting over (there were very few changes in those two branches,
> I hadn't gotten very far).  Now I have it very close to being finished and I
> can't seem to get it to work like it was a few minutes ago.  Unfortunately,
> I have not committed my changes frequently enough (dumb, I know) so I will
> have to start over again.  (I can copy the edited files out of the git tree,
> create a new branch and copy them back, but I would like to get to the
> bottom of this weirdness before I do),
>
> I am working in development mode.  I can edit and test the .js.erb file in
> assets with no problems for hours on end.  Most of the time I don't even
> have to restart the server (usually when I edit routes.rb).
>
> Suddenly, it gives me an error message about needing to pre-compile the js
> file in production mode by editing a config file and restarting.

Can you copy/paste the full error message please.  I have seen errors
like this where the message is a bit confusing.

Also it would be worth comparing the logs before and after it fails to
see what the difference is.

Colin

>    Without
> changing the config (as it recommends) when I restart the app it no longer
> loads the javascript file, and none of the routines in it execute anymore.
> It also ignores any edits that I make to that file.  In one of the earlier
> cases I did edit the config file as it requested, but that did nothing to
> solve the problem.
>
> I don't have any idea what I might have changed to cause this.  I looked at
> the git status and I have only changed/created four files:
>
> 1) The layout file that originally had the js code (was moved to the newly
> created js.erb file)
> 2) The controller file
> 3) The routes.rb file, and
> 4) The newly created js.erb file.
>
> The last edit was to correct a typo in the js.erb file.
>
> The program works (loads the js from the layout file and does everything
> that is already coded) when I switch back to the master branch, but as soon
> as I go to the working branch, the problem comes back.
>
> The rails log seems to show it loading pre-compiled scripts after it breaks,
> while before it seems to be getting files from the assets directory.  (Not
> sure about this).
>
> I tried both Firefox and Chrome and both show the same behavior (not
> surprising).
>
> I double checked that RAILS_ENV=development and it is.  This has been setup
> for years and only changes when I explicitly set it to production (rarely).
> It returns to development whenever I login.
>
> Where should I start looking for this problem?
>
> Thanks,
>
> Don
>
>
> --
> 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+unsubscr...@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/56DE5FC6.8050506%40ziesig.org.
> For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@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/CAL%3D0gLsMwP_%3DRJqdnZ%3DadExaPuHU7QXcrx3H05GA8nLZzvXXig%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to