All Questions
Tagged with deployment ruby-on-rails
1,662
questions
168
votes
37
answers
220k
views
Heroku deployment error H10 (App crashed)
I have a RoR app working on my local computer, but when I send it to heroku, it crashes. The error log gives an error H10 & says:
2012-11-21T15:26:47+00:00 app[web.1]: from /app/vendor/...
88
votes
7
answers
24k
views
Slow initial server startup when using Phusion Passenger and Rails
To jump on the band-wagon of Phusion Passenger we've setup a staging server for a small rails app to test things out.
So far it has been very nice to use, it makes installing/configuring and ...
70
votes
11
answers
37k
views
ExecJS::ProgramError: Unexpected token punc «(», expected punc «:» when running rake assets:precompile on production
When deploying my Rails app I get the following error:
rake aborted!
ExecJS::ProgramError: Unexpected token punc «(», expected punc «:» (line: 15, col: 14, pos: 265)
Error
at new ...
67
votes
12
answers
16k
views
Deploying a Git subdirectory in Capistrano
My master branch layout is like this:
/ <-- top level
/client <-- desktop client source files
/server <-- Rails app
What I'd like to do is only pull down the /server directory in my ...
58
votes
3
answers
23k
views
Capistrano deployment problems
When I type
cap production deploy
I get
Capfile locked at 3.1.0, but 3.2.0 is loaded
When I uninstall capistrano 3.2.0 I get
Could not find capistrano-3.2.0 in any of the sources
Run `bundle ...
54
votes
9
answers
37k
views
Capistrano SSH::AuthenticationFailed, not prompting for password
I've been using capistrano successfully for a while now and all of a sudden in every project I've lost the ability to deploy.
Environment:
os X (Mavericks)
ruby 1.9.3p194
rvm (locally, not on server)...
53
votes
6
answers
73k
views
How to restart puma after deploy?
I'm using Rails, Puma, Capistrano3. I have installed the gem capistrano3-puma as well. I started Puma with Puma Jungle https://github.com/puma/puma/tree/master/tools/jungle/upstart
How do I restart ...
51
votes
6
answers
23k
views
How Do You Secure database.yml?
Within Ruby on Rails applications database.yml is a plain text file that stores database credentials.
When I deploy my Rails applications I have an after deploy callback in my Capistrano
recipe that ...
40
votes
7
answers
20k
views
Deploying RoR app to Heroku with SQLite 3 fails
I'm trying to deploy my first app to Heroku. I'm using SQLite as the database. As far as I know Heroku doesn't use SQLite - it switches to Postgres in the backend.
When I'm deploying I get the ...
39
votes
4
answers
18k
views
How do I target a specific commit SHA with capistrano deploy
I am wondering how I can target a specific commit SHA in Git for deployment, using Capistrano? It should be something like
cap deploy --version=<sha targeted>
Can't seem to find the answer to ...
38
votes
8
answers
48k
views
How can I clear rails cache after deploy to heroku?
I applied cache to my heroku rails app and it works well.
But everytime I deploy to heroku, I also want to clear cache automatically.
so I googled and I found this.
task :after_deploy, :env, :...
37
votes
4
answers
49k
views
Missing production secret_key_base in rails
I have recently deployed an app and got an internal server error because of missing production secret_key_base. After hours of testing, I managed to solve this problem with two methods:
Method 1:
I ...
36
votes
4
answers
23k
views
How can I find Phusion Passenger version?
How can I find my Phusion Passenger version? is there a command i can run from the terminal?
32
votes
10
answers
29k
views
bundle install doesn't work from capistrano
I want to deploy my simple rails 4.0 application via capistrano 3.0.
I use bundler 1.3.5 so I add capistrano-bundler gem to integrate bundler with capistrano.
I have pretty simple configuration (...
32
votes
1
answer
16k
views
Deploying Ruby on Rails - Is there a good alternative for Heroku? [closed]
I'm starting a new small venture, a POC if you would like, and I want to deploy my Rails application for free somewhere.
I found that there is Heroku, are there another options?
31
votes
9
answers
4k
views
Best practices for new Rails deployments on Linux?
I've used straight Mongrel, I've used Mongrel clusters behind Apache, I've looked at Thin, and I'm becoming very intrigued by Passenger. I've looked at Nginx, too. I've looked at MRI, Ruby Enterprise ...
28
votes
6
answers
48k
views
Rails Production - How to set Secret Key Base?
So I am trying to get my rails app to deploy in production mode, but I get the error: Missing secret_token and secret_key_base for 'production' environment, set these values in config/secrets.yml
My ...
28
votes
3
answers
10k
views
Good Git deployment using branches strategy with Heroku?
What is a good deployment strategy to use with Git + Heroku (Ruby on Rails)?
Currently, the way I work with my origin Git repository: All features (or 'stories') are first checked out as branches, ...
27
votes
13
answers
17k
views
clearing rails app database on heroku production site
So I'm new to ROR and Heroku and need a little help. I've created an app and have deployed it; however, I'd like to clear out the database associated with it. Meaning I'd like to clear any users (and ...
26
votes
4
answers
90k
views
Set Node.js to $PATH
I am studying RoR and I am setting this virtual machine to "deploy" RoR and I got stuck in the Node.js installation.
I am using Ubuntu 12.04 and I followed this step of this guide:
http://railsapps....
25
votes
2
answers
4k
views
How can I make Rails 3 assets precompile faster?
I have a running Rails 3.2.1 application, that I'm deploying via Capistrano with the deploy/assets which runs the deploy:assets:precompile task.
Everything works just fine, except that the ...
24
votes
2
answers
11k
views
Restarting Unicorn with USR2 doesn't seem to reload production.rb settings
I'm running unicorn and am trying to get zero downtime restarts working.
So far it is all awesome sauce, the master process forks and starts 4 new workers, then kills the old one, everyone is happy.
...
23
votes
2
answers
8k
views
How to modify capistrano deploy to automatically run migrations in Rails 3.0
Right now, I have to run cap deploy and cap deploy:migrations if there are migrations to be run.
how I modify the cap deploy task to run migrations.
21
votes
5
answers
7k
views
How can I deploy 'private' gems that my apps can access but no one else can get?
I have several apps which I want to share some common code. I'd like to gem the code and share/version it across the apps that way, although I don't want to publish it to a public gem server.
What ...
21
votes
3
answers
7k
views
Is there a way to deploy into a vagrant VM using Capistrano?
I'd like to setup a vagrant instance outside of my project directory. Is there a way to deploy rails into the vagrant VM with capistrano as I would to my real production host?
I'm trying to use ...
21
votes
3
answers
5k
views
database.yml deployment best practice
I don't check my database.yml file into source control and I was wondering what others do/best practice for copying this file over to the server when deploying.
I use Capistrano for deployment.
20
votes
2
answers
30k
views
Docker Rails app fails to be served - curl: (56) Recv failure: Connection reset by peer
I build a Rails app container with the following Dockerfile:
$ cat Dockerfile
FROM ruby:2.2
MAINTAINER Luca G. Soave <[email protected]>
RUN apt-get update && apt-get install -y ...
19
votes
6
answers
5k
views
Rails app moved to production server gives "dump format error for symbol" error
I've just moved my rails app from the development to deployment server.
I've installed passenger, but I wanted to try with rails s to make sure all was running fine (this is the first time I develop ...
19
votes
7
answers
17k
views
Pushing Rails with SQLite3 to Heroku fails [duplicate]
I experience the same scenario as described in Heroku deployment issue when I try to deploy my Rails 3 app to Heroku and sqlite3 is defined in the gems file.
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/...
19
votes
6
answers
18k
views
Heroku deployment failed because of sqlite3 gem error
I just started the ruby.railstutorial.org book by Michael Hartl and have been working through the first chapter. I am using mac book OS X, Terminal, and Sublime Text. Everything has gone according to ...
19
votes
3
answers
19k
views
Using Capistrano to deploy a Rails application to multiple web servers
I'm currently setting up a new production environment for a Rails application which includes multiple, load-balanced application servers (currently only two, but this will increase over time).
I'd ...
19
votes
8
answers
20k
views
Rails - Invalid Authenticity Token After Deploy
We're using EngineYard Cloud to deploy our Ruby on Rails application. We are running Rails v2.3.3.
EngineYard Cloud deploys to AWS instances in a manner similar to Capistrano. After each deploy, we'...
19
votes
4
answers
6k
views
"Warm Up Cache" on deployment
I am wondering if anyone has any plugins or capistrano recipes that will "pre-heat" the page cache for a rails app by building all of the page cached html at the time the deployment is made, or ...
19
votes
4
answers
22k
views
Setting the Ruby on Rails application environment using Capistrano on Phusion Passenger
I have 2 environments, production and staging, and I am using Capistrano with capistrano-ext gem.
When I deploy to staging using Capistrano and restart passenger, I would like the deployed ...
18
votes
7
answers
12k
views
Rails 4 + Capistrano 3 : fatal: Could not read from remote repository while deploying
I am getting following error while deploying Rails 4 application using Capistrano 3
INFO [87512eb8] Running /usr/bin/env chmod +x /tmp/magnificent/git-ssh.sh as [email protected]
DEBUG [87512eb8] ...
18
votes
2
answers
17k
views
Capistrano - "cannot load such file --deploy"
Working on an existing rails project that is set up to deploy with Capistrano. Trying to determine my first step in figuring out this error. Can anyone point me in the right direction of what I need ...
18
votes
6
answers
12k
views
Most of my assets suddenly return 404 after a push to heroku
I have deployed this app (rails 3.2.11) a million times, I haven't messed with any settings, but now I'm greeted with this:
Why did this happen out of the blue? My conents of application.rb include ...
18
votes
3
answers
8k
views
DB management for Heroku apps
I'm fairly new to both Rails and Heroku but I'm seriously thinking of using it as a platform to deploy my Ruby/Rails applications.
I want to use all the power of Heroku, so I prefer the "embedded" ...
18
votes
5
answers
20k
views
Capistrano + Git : repository local to production server
I am trying to do 'deploy:cold' for my app. The git repo is local to
my deployment server (i.e. I only have one server for everything and I
don't host my code on github).
Here is the transcript (...
17
votes
2
answers
7k
views
App pushed to heroku still shows standard index page
I went through the steps to install git and the heroku gem and successfully pushed my app to heroku.
The problem is, it shows a standard "You're Riding Ruby on Rails" page even though the local app I ...
17
votes
8
answers
8k
views
Rails 3 on dreamhost?
I'd like to deploy a small Rails 3 app on dreamhost (just for testing purposes, nothing serious) and I am wondering if anyone has done it already... Please choose one of the following:
I did it and ...
17
votes
1
answer
10k
views
undefined method `run' for main:Object
i'm getting the following output when deploying:
cap aborted!
NoMethodError: undefined method `run' for main:Object
config/deploy.rb:37:in `block (2 levels) in <top (required)>'
/var/lib/gems/1....
17
votes
2
answers
10k
views
Rails: Why is bundle install frozen up by sassc 2.4.0
I'm trying to deploy my rails app with Capistrano, however, the deploy process (cap production deploy) is constantly held up at the line:
$HOME/.rbenv/bin/rbenv exec bundle install --path /home/deploy/...
16
votes
3
answers
13k
views
Capistrano: linked file database.yml does not exist on my.server.ipadress
after i try to deploy my app via capistrano to my server i get this error message:
DEBUG [605f198a] Finished in 0.084 seconds with exit status 1 (failed).
ERROR linked file /home/deploy/myrailsapp/...
15
votes
4
answers
11k
views
How to automatically restart delayed_job when deploying a rails project on Amazon Elastic Beanstalk?
I'm hosting a rails project on Amazon Elastic Beanstalk and I try to configure a container command to automatically restart my delayed_job worker on the server after each deployment.
I tried with ...
15
votes
2
answers
16k
views
LoadError: cannot load such file -- capistrano/rbenv
I'm following this guide to deploy my Rails app on DigitalOcean using Capistrano.
At the end of stop 5 I check the server availability through the following command:
cap production deploy:check
...
14
votes
2
answers
5k
views
Can not deploy my rails app to heroku after getting asset not present in asset pipeline error
My app works fine on my localhost but now am trying to deploy it to heroku and it says:
We're sorry, but something went wrong.
If you are the application owner check the logs for more information.
...
14
votes
5
answers
6k
views
deploying rails to heroku - unauthorized public key access
So I'm trying to deploy my app to heroku but it keeps giving me this error whenever I push to master:
! Your key with fingerprint cb:e1:5c:31:cd:6b:78:6e:30:ff:eb:11:e2:4b:2e:b3 is not authorized to ...
14
votes
1
answer
14k
views
How to start Sidekiq worker on Ubuntu VPS (Digitalocean)
I already setup Redis, Sidekiq and Rails app, I can access it form //url/sidekiq, but how do I start the Sidekiq worker on a VPS? On my local I do:
bundle exec sidekiq -q carrierwave,5 default
What ...
14
votes
3
answers
6k
views
Changing a Rails route based on deployment type
Is there a good way of modifying a route based on the deployment type?
Basically, I have a route that has a :requirements => {:protocol => "https"}, and I'd like that to only happen in production, ...