Deploy with Capistrano

Asked

Viewed 99 times

0

I have to run my Rails app on one machine and DBMS (in this case Postgresql) on another server.

I set up the database.yml as follows:

production:
<<: *default
database: nomedobanco
username: username
password: senha
host: banco.cloudapp.net[poderia aqui colocar ip interno?]

And the desploy.Rb:

server "app.cloudapp.net", :web, :app
server "banco.cloudapp.net", :db,primary:true

When I do deploy error occurs:

[out :: appreviews.cloudapp.net] Gem::Installer::Extensionbuilderror: ERROR: Failed to build Gem

Because that mistake?

  • You already have the postgre installed on the machine?

  • Edit your question by adding more information. For example: which operating system are you using? You can put the complete error?

  • You can put internal IP if you are on the same network the db and the app, both is q in the Development the default is localhost

  • Because in his Gemfile has any gem that uses shared libraries that are not present or not found at the time Rubygems is invoked to install dependencies. If you post the error backtrace in addition to the information already requested in the comments it is much easier to try to help you.

1 answer

1

Some Gems need to be compiled locally along with native libraries. The error message is saying that one of these Gems was not installed properly there on your deploy server.

The Pistrano deploy has a step in which it performs bundle install and that’s when it installs new Gems that you added in Gemfile. This step gave error.

My suggestion. Log in to your server and try to run bundle install there to see the error. Or if you already have the post error here.

Usually these errors occur because some library is missing from your deploy machine. If you analyze the error message you should find out. So just use sudo apt-get install to install (if it is linux, but I’m assuming it is)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.