heroku-rails | easy configuration / multi-environment setup | Platform As A Service library
kandi X-RAY | heroku-rails Summary
kandi X-RAY | heroku-rails Summary
Easier configuration and deployment of Rails apps on Heroku. Configure your Heroku environment via a YML file (config/heroku.yml) that defines all your environments, addons, and environment variables. Heroku Rails also handles asset packaging (via jammit), deployment of assets to s3 (via jammit-s3).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Sets up the apps for all available apps .
- This method is called after the project .
- Update the config files
- Runs the project .
- Creates a new application for all apps .
- Migrates all apps for the application .
- Creates a new App instance
- Clear all commands .
- Returns an array of all the settings from the app
- Override config to set environment variables
heroku-rails Key Features
heroku-rails Examples and Code Snippets
Community Discussions
Trending Discussions on heroku-rails
QUESTION
This runs locally (without specifying driver_path
), but not on Heroku.
Code:
...ANSWER
Answered 2017-Nov-19 at 18:01I am quoting Ilya Vassilevsky from this post
ChromeDriver is just a driver for Chrome. It needs the actual Chrome browser installed on the same machine to actually work.
Heroku doesn't have Chrome installed on its dynos by default. You need to use a buildpack that installs Chrome. For example:
https://github.com/dwayhs/heroku-buildpack-chrome
You can see how it fetches Chrome:
https://github.com/dwayhs/heroku-buildpack-chrome/blob/master/bin/compile#L36-38
Then I read their discussion in the comments:
Petr Gazarov says
I tried this buildpack and it didn't work. I'm suspecting installing google chrome (or any browser) on heroku might be more involved.
Ilya Vassilevsky replies
Yes, Heroku is a very opinionated and closed platform. It should be much easier to set up Chrome with ChromeDriver on your own VM on AWS, Linode, or DigitalOcean.
Petr Gazarov replies
Thanks for your answer Ilya. I ended up re-writing with Watir with phantomjs because I couldn't get Heroku to install Chrome.
You can read more info in that question. If something comes to my mind, I will post it.
QUESTION
I'm building an app with rails and deploying a non master branch to heroku master test the app in production. I didn't want to mess with master until I know what I'm doing on Heroku, therefore I deployed a feature branch.
The repository of the app can be found here if the refernce is needed.
After any change to the gemfile I ran:
...ANSWER
Answered 2018-Sep-03 at 20:14SQLite does not work with Heroku as its disk based and Heroku uses an ephemeral file system.
SQLite runs in memory, and backs up its data store in files on disk. While this strategy works well for development, Heroku’s Cedar stack has an ephemeral filesystem. You can write to it, and you can read from it, but the contents will be cleared periodically. If you were to use SQLite on Heroku, you would lose your entire database at least once every 24 hours.
Even if Heroku’s disks were persistent running SQLite would still not be a good fit. Since SQLite does not run as a service, each dyno would run a separate running copy. Each of these copies need their own disk backed store. This would mean that each dyno powering your app would have a different set of data since the disks are not synchronized.
Heroku provides Postgres as the free default database for rails which is as close to a recommendation as you can get.
If you are deploying to Postgres you should also be developing/testing on Postgres.
Differences between backing services mean that tiny incompatibilities crop up, causing code that worked and passed tests in development or staging to fail in production. These types of errors create friction that disincentivizes continuous deployment. The cost of this friction and the subsequent dampening of continuous deployment is extremely high when considered in aggregate over the lifetime of an application.
- https://12factor.net/dev-prod-parity
If you really want to stick with SQLite you need to configure the adapters properly:
QUESTION
My Rails 4 app works fine locally, and also when it's deployed to Heroku in production mode... until I access the app from a second client... then after a few clicks I start getting the following strange sequence of errors (see below).
The exact number of clicks varies a little but it always happens eventually... and but only after a request from a second client. For example, if I restart the app and only play with it on my phone nothing happens. But as soon as I load a couple pages from my laptop... crash
ErrorsNOTE: These screenshots are with RAILS_ENV=development
so that the actual errors appear.
I'm not sure if I'm understanding these errors correctly, but it looks like ?
is not getting properly substituted in the query.
- Rails 4.2
- hosted on Heroku
- Ruby 2.2.x
- MySQL (via ClearDB add-on)
My Gemfile:
...ANSWER
Answered 2017-Jan-01 at 17:42I took a second crack at deploying with the mysql2 gem, and this time it worked. The secret sauce comes from this question
TLDR; You need to specify and older version of mysql2 in order to be compatible with newer versions of Rails. Yea it's weird.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install heroku-rails
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page