Ask A Question

Notifications

You’re not receiving notifications from this thread.

Deploy Ubuntu 12.04 Precise Pangolin Discussion

Chris Oliver asked in General
Diego Peralta Diego Peralta

Great tutorial!

Just one thing, the Gemfile it's wrong, it's pointing to the wrong repository of each capistrano implementation. This should work:

gem 'capistrano', '~> 3.0.0'
gem 'capistrano-bundler', '~> 1.0.0'
gem 'capistrano-rails', '~> 1.0.0'

# Add this if you're using rbenv
# gem 'capistrano-rbenv', github: "capistrano/rbenv"

# Add this if you're using rvm
# gem 'capistrano-rvm', github: "capistrano/rvm"

Cheers,
Diego

Reply

Ah thanks! Fixed that up. :)

Reply

Very nice tutorial, just what I needed. You should write this for digitalocean, they are offering $50 for each article now I believe.

I've always done the Postgres step a bit differently but this works too.

Reply

I keep getting error on 'rbenv:validate'? Has anyone else seen this issue or know how to resolve it?

Reply

I haven't, but it seems you're not the only one https://gist.github.com/Dev...

Reply
David Martinez Peña David Martinez Peña

Hi! good job.
I've followed your tutorial, I'm new in rails. This is my first app, it's working in development, and this is my first try to put in production.
Everything went ok until I have arrived to command: "cap production deploy" this returns to me an error:
cap production deploy
/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- capistrano/cli (LoadError)
from /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/bin/cap:3:in `<main>'

When following your tutorial i've used rbenv with ruby 1.9.3-p194 as in deployment-machine.
I've created database on MySQL and migrate also works.

Thanks in advance and sorry for my english.

Reply

Did you make sure to include the rbenv or rvm gems for capistrano and configuration?

Reply

Thanks for the tutorial, first of all, none of the articles at digitalocean worked for me.
I followed all the steps (using rvm for ruby installation), but when I do 'cap production deploy', I get the following error:

deploy@testdroplet:~/myapp$ cap production deploy --trace
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke bundler:map_bins (first_time)
** Execute bundler:map_bins
** Invoke rvm:hook (first_time)
** Execute rvm:hook
DEBUG [971a1192] Running /usr/bin/env [ -d ~/.rvm ] on 188.226.143.213
DEBUG [971a1192] Command: [ -d ~/.rvm ]
cap aborted!
deploy
/home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/net-ssh-2.7.0/lib/net/ssh.rb:215:in `start'
/home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.3.0/lib/sshkit/backends/connection_pool.rb:25:in `create_or_reuse_connection'
/home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:173:in `ssh'
/home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:126:in `block in _execute'
/home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:123:in `tap'
/home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:123:in `_execute'
/home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:62:in `test'
/home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/capistrano-rvm-0.1.1/lib/capistrano/tasks/rvm.rake:19:in `block (3 levels) in <top (required)="">'
/home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `run'
/home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.3.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => rvm:hook

I've been trying to fix it for a few hours now with no luck.
Any help would be appreciated,

Ulugbek

Reply

Sounds like an SSH authentication problem. Take a look at the people here who also had the same problem. https://github.com/capistra...

Reply

Hi Chris, great tutorial! My one question is -- how can I apply this for multiple Rails apps hosted on the same Digital Ocean server?

Thanks.

Reply

Pretty simple, all you need to do is to deploy multiple apps with Capistrano and setup multiple nginx server blocks. You'll be able to simply upload the new apps and everything will be already setup so long as you tell nginx to respond to those on the correct domains.

Reply

Thanks for this. I am getting an error on installing passenger, it looks like the apt source changed according to this:

http://www.modrails.com/doc...

So this:

sudo sh -c "echo 'deb https://oss-binaries.phusio... 12.04 main' >> /etc/apt/sources.list.d/passenger.list"

should be:

sudo sh -c "echo 'deb https://oss-binaries.phusio... precise main' >> /etc/apt/sources.list.d/passenger.list"

Reply

Oh shoot, thanks! I missed this when I rewrote the site. Fixed now.

Reply

I'd also add libffi-dev to the first apt-get install before compiling ruby.

Reply

Not a bad idea, I'll see about adding that shortly.

Reply

Hi, amazing tutorial! Can you update it for 14.04?

Reply

It is in the works! First we're waiting on the passenger package to get updated for 14.04. I'm going to try it with an older version, but we'll see.

Reply
Everett Carney Everett Carney

I'm not sure if anyone else is getting this, but I'm running into an issue deploying my app. When I run the Capistrano deploy script it's not generating the same file structure I anticipate, here's my error:

DEBUG [e8519776] Running /usr/bin/env [ -f /home/deploy/blog/shared/config/database.yml ] on sm-beta.cloudapp.net

DEBUG [e8519776] Command: [ -f /home/deploy/blog/shared/config/database.yml ]

DEBUG [e8519776] Finished in 1.009 seconds with exit status 1 (failed).

ERROR linked file /home/deploy/blog/shared/config/database.yml does not exist on sm-beta.cloudapp.net

Looked around on Google for a bit and, supposedly, this shouldn't break my deploy which means something else is up. Any ideas where I might be able to look for other problem spots? If I ls into my blog app I only have two folders, 'releases' and 'shared'. Any thoughts/pointers are greatly appreciated!

Reply

I imagine that it's trying to run migrations and the database.yml would be required for that. You can hop on to the server and create that file if you don't have it in your repo. Setup a production section with the right credentials.

Reply

hi i am newbie... help me here.. i got my app added in to github. I have digital ocean vps with ubuntu 12.04. I am deploying my app to server now.

I have done everything untill Capistrano Setup

the problem is it's confusing me mainly this line "The first step is to add Capistrano to your Gemfile". i have checked my server files using sftp client and i couldn't find it.

can you please specify the path of Gemfile please. I am almost close to deploy my app and i am stuck with this thing. It might be easy for you but i am new to rails. Please send a reply asap.

Jinu

Reply

Hey Jinu, your Gemfile should be in the top folder of your Rails app. This is what defines your version of Rails and other gems that you use. You want to edit the Gemfile on your computer first (not on the server) to add Capistrano.

Reply

Hi Chris,

can you look in to it.

Open up /etc/nginx/sites-enabled/default in your text editor

how to do it?

Reply

when i am trying nano /etc/nginx/sites-enabled/default

a new file is opening. is that the right way?

Reply

When i did cap production deploy i got following error its connecting to mydomain.com and ip address but i don't know whts happening. please someone help

cap aborted!
SocketError: getaddrinfo: Name or service not known
/home/hub/.rvm/gems/ruby-2.1.0/gems/net-ssh-2.7.0/lib/net/ssh/transport/session.rb:67:in `initialize'
/home/hub/.rvm/gems/ruby-2.1.0/gems/net-ssh-2.7.0/lib/net/ssh/transport/session.rb:67:in `open'
/home/hub/.rvm/gems/ruby-2.1.0/gems/net-ssh-2.7.0/lib/net/ssh/transport/session.rb:67:in `block in initialize'
/home/hub/.rvm/gems/ruby-2.1.0/gems/net-ssh-2.7.0/lib/net/ssh/transport/session.rb:67:in `initialize'
/home/hub/.rvm/gems/ruby-2.1.0/gems/net-ssh-2.7.0/lib/net/ssh.rb:200:in `new'
/home/hub/.rvm/gems/ruby-2.1.0/gems/net-ssh-2.7.0/lib/net/ssh.rb:200:in `start'
/home/hub/.rvm/gems/ruby-2.1.0/gems/sshkit-1.3.0/lib/sshkit/backends/connection_pool.rb:25:in `create_or_reuse_connection'
/home/hub/.rvm/gems/ruby-2.1.0/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:173:in `ssh'
/home/hub/.rvm/gems/ruby-2.1.0/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:126:in `block in _execute'
/home/hub/.rvm/gems/ruby-2.1.0/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:123:in `tap'
/home/hub/.rvm/gems/ruby-2.1.0/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:123:in `_execute'
/home/hub/.rvm/gems/ruby-2.1.0/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:62:in `test'
/home/hub/.rvm/gems/ruby-2.1.0/bundler/gems/rvm-dc35ec5e7a74/lib/capistrano/tasks/rvm.rake:19:in `block (3 levels) in <top (required)="">'
/home/hub/.rvm/gems/ruby-2.1.0/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/home/hub/.rvm/gems/ruby-2.1.0/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `run'
/home/hub/.rvm/gems/ruby-2.1.0/gems/sshkit-1.3.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => rvm:hook
(See full trace by running task with --trace)

Reply

SocketError: getaddrinfo: Name or service not known means it cannot connect to the IP address / domain that you put in. Make sure you don't have any typos and that you specified your domain correctly.

Reply

hi,

my app using rvm 2.1.1 do i need to use the same in server

Reply

It's best to use the same setup on the server if you can. Definitely make sure you're using the same version of Ruby to be on the safe side otherwise bugs can come up. I would upgrade to 2.1.2 because 2.1.1 had compile bugs with readline on Ubuntu.

Reply

hi chris
are you here?
i got a doubt

Reply

when i am deploying my app, the deploy path should be new or an already created app? which means when i push my contents. it will got to /home/deploy/myapp

i am just deploying my respo to /home/deploy/myapp (where my app is a fresh directory).

do i need to create scratch rails app before deploying?

then deploy my app in to the scratch rails app?

Reply

i have deployed my app to digital ocean. i got current directory. but when i visit current folder and try RAILS_ENV=production bundle exec rake db:create it's saying to bundle install first.

when i am trying to bundle install in current it'd saying install git. i couldn't install git in current right/?

so whats wrong here?

Reply

hi chris i done deploy successfully using your guide. the only problem is i am still gettng nginx page on my ip.

Reply

i tried touch myapp/current/tmp/restart.txt and it didn't started my app. the ip still showing nginx welcome. wht i did worng here?

Reply

You'll need to make sure you delete the default server block for Nginx, add your Rails one, and then run "sudo service nginx restart" to load all those new configs.

Reply

hi chris,

i got an error when i am doing seed after deploy... can you tell me whats worng

[schema_associations] Authorization.belongs_to :oauth_provider, :class_name=>"OauthProvider", :foreign_key=>"oauth_provider_id", :inverse_of=>:authorizations
[schema_associations] Authorization.belongs_to :user, :class_name=>"User", :foreign_key=>"user_id", :inverse_of=>:authorizations
Rendered custom/devise/mailer/confirmation_instructions.en.html.slim within layouts/email (30.6ms)
rake aborted!
Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/http/url.rb:59:in `build_host_url'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/http/url.rb:40:in `url_for'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:670:in `url_for'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:401:in `url_for'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:234:in `call'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:178:in `call'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:274:in `block (2 levels) in define_url_helper'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/routes_proxy.rb:31:in `user_confirmation_url'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/routes_proxy.rb:34:in `method_missing'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/devise-3.1.2/lib/devise/controllers/url_helpers.rb:50:in `confirmation_url'
/home/deploy/silcom/releases/20140530151732/app/views/custom/devise/mailer/confirmation_instructions.en.html.slim:7:in `_app_views_custom_devise_mailer_confirmation_instructions_en_html_slim__458522283_113549150'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_view/template.rb:143:in `block in render'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/notifications.rb:161:in `instrument'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_view/template.rb:141:in `render'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_view/renderer/template_renderer.rb:49:in `block (2 levels) in render_template'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/notifications.rb:159:in `block in instrument'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/notifications.rb:159:in `instrument'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_view/renderer/template_renderer.rb:48:in `block in render_template'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_view/renderer/template_renderer.rb:56:in `render_with_layout'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_view/renderer/template_renderer.rb:47:in `render_template'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_view/renderer/template_renderer.rb:17:in `render'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_view/renderer/renderer.rb:42:in `render_template'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_view/renderer/renderer.rb:23:in `render'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/abstract_controller/rendering.rb:127:in `_render_template'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/abstract_controller/rendering.rb:120:in `render_to_body'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/abstract_controller/rendering.rb:97:in `render'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionmailer-4.0.2/lib/action_mailer/base.rb:755:in `block in collect_responses'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionmailer-4.0.2/lib/action_mailer/base.rb:769:in `each'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionmailer-4.0.2/lib/action_mailer/base.rb:769:in `each_template'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionmailer-4.0.2/lib/action_mailer/base.rb:751:in `collect_responses'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionmailer-4.0.2/lib/action_mailer/base.rb:691:in `mail'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/devise-3.1.2/lib/devise/mailers/helpers.rb:16:in `devise_mail'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/devise-3.1.2/app/mailers/devise/mailer.rb:6:in `confirmation_instructions'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/abstract_controller/base.rb:189:in `process_action'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:373:in `_run__527241932__process_action__callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:80:in `run_callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/abstract_controller/base.rb:136:in `process'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/abstract_controller/rendering.rb:44:in `process'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionmailer-4.0.2/lib/action_mailer/base.rb:503:in `process'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionmailer-4.0.2/lib/action_mailer/base.rb:497:in `initialize'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionmailer-4.0.2/lib/action_mailer/base.rb:480:in `new'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/actionmailer-4.0.2/lib/action_mailer/base.rb:480:in `method_missing'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/devise-3.1.2/lib/devise/models/authenticatable.rb:175:in `send_devise_notification'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/devise-3.1.2/lib/devise/models/confirmable.rb:102:in `send_confirmation_instructions'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/devise-3.1.2/lib/devise/models/confirmable.rb:158:in `send_on_create_confirmation_instructions'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:386:in `_run__437918340__create__callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:80:in `run_callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/callbacks.rb:306:in `create_record'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/timestamp.rb:57:in `create_record'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/persistence.rb:477:in `create_or_update'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/callbacks.rb:302:in `block in create_or_update'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:413:in `_run__437918340__save__callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:80:in `run_callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/callbacks.rb:302:in `create_or_update'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/persistence.rb:128:in `save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/validations.rb:57:in `save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/attribute_methods/dirty.rb:41:in `save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:275:in `block in save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:326:in `block in with_transaction_returning_status'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:200:in `transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:209:in `transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:323:in `with_transaction_returning_status'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:275:in `save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:487:in `block in save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:502:in `block (2 levels) in around_save'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:150:in `block in run_actions'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:170:in `catch_exceptions'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:148:in `run_actions'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:133:in `run_callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:212:in `run_callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `block (2 levels) in perform'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `catch'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `block in perform'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:186:in `within_transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:62:in `perform'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:502:in `block in around_save'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:530:in `block in transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `block in transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:210:in `within_new_transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:209:in `transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:529:in `transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:501:in `around_save'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:487:in `save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/protected_attributes-1.0.5/lib/active_record/mass_assignment_security/validations.rb:17:in `create!'
/home/deploy/silcom/releases/20140530151732/db/seeds.rb:135:in `<top (required)="">'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:540:in `load_seed'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/tasks/database_tasks.rb:154:in `load_seed'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/railties/databases.rake:181:in `block (2 levels) in <top (required)="">'
Tasks: TOP => db:seed
(See full trace by running task with --trace)

Reply

Well it says: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true

So you need to set that in your different environment.rb files. Probably forgot to add that in your production.rb

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,329+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.