I've recently added some codes in the initialiser file of my rails application. Like any other rails app, I have to restart the app for it to call the initializers again. Does 'heroku restart' does the same thing (after committing the files etc.)? If not, what's the correct method to run the initialisers files in heroku? Thanks! :)
On pushing your app a new slug is compiled and started, so your rails app gets basically restarted every time you push a new version. heroku restart will let you restart your processes without pushing and should be done for example after migrating your database with heroku run rake db:migrate.
initializers are run when the application is launched. restarting the application stops it, then launches it.. so yes. :)
Related
This is really weird I can't explain it.
On Android, I have my device. I connected it via USB debugging. Things were working fine last night. Now, when i have remote debugging enabled, its using a cached version of the bundle or something, because my changes are not coming through.
I did a cd android and ./gradlew clean and then restarted metro bundler, run-android, and even restarted device. However no matter what, if remote debugging is enabled, its using an old bundle and not reflecting my newest changes.
Its even more weird because I have "live reload" enabled and whenever I save it does trigger a reload of the app, but its not with my newest changes!
Does anyone know whats going on and how to fix?
Try to delete folder android/build, it helped for me
I had it too - cleaning my Chrome’s cache solved the problem for me!
When I run calabash-android, it appears to push the apk to the device for every feature file. I would prefer to push the apk once and reuse it, as each push takes about half a second, and I expect eventually to have enough feature files for this to matter. I'd be happy with a solution which doesn't push the apk at all and to push it myself in an earlier step.
Is it pushing the app each time or just restarting the app? My tests restart between each step by default but I have always had to control the installations.
I deal with the installation by tagging the scenarios that require a reinstall and looking for the tag in my before hook.
If it is the restarting between scenarios that you want to control then you can use the RESET_BETWEEN_SCENARIOS setting.
First time I've seen this error when running a migration on Heroku.
heroku rake db:migrate --app myapp
(in /app)
New Relic Agent not running.
I have the New Relic addon in my app addons so would this be an issue with the heroku platform or my app?
edit: App is running on the bamboo-ree-1.8.7 stack.
The answer is that Heroku is telling you that the New Relic Agent is not running in that environment when you run rake, however rake db:migrate is still working, so actually everything is working as it should.
Simply run your rake db:migrate, ignore the New Relic message, then heroku restart and everything should be working just fine.
Seems this was a simple fix. The new relic addon on Heroku stopped working and simply required me to remove and add it back to my application.
I'm using Rails v. 3.0.9 and have pushed the app to Heroku. When I view the custom Heroku domain I get the following message from Heroku:
"We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly."
I run heroku logs and don't seem to get any error messages. The only error I encounter with Heroku seems to be when I run heroku rake db:migrate with which I get the following in return:
rake aborted!
uninitialized constant Rake::DSL
Note: I'm new to Rails and to Heroku. I'm not quite understanding the difference between production and development environments. Do I need to be in production for Heroku to work? At the moment, I'm using localhost3000 to view my app. Thanks guys!
I have a blog post about it here:
http://codeglot.com/posts/13-you_have_already_activated_rake_0_9_2
There are two solutions. Use an older version of rake or require DSL.
I've been working on a on uploading my RoR3 website onto Heroku.
Took me a while to get it up. Seems to work pretty good but when i try creating a project (my website manges donation projects) i get the next message:
We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly.
No idea what causes this it works fine on my localhost.
The normal Rails Error - Have a look at the Heroku Logs and check the Stack for more details then post them back on here.
Usually when I've had this problem, it's because I've forgotten to run db migrations at Heroku.
In terminal, in your rails app folder, run this:
heroku rake db:migrate
If needed, you can find more info in this thread.