I learnt how to deploy rails project to VPS from railscasts #335 Deploying to a VPS. But I get a problem when add a new gem to Gemfile.
For this time, i add devise to Gemfile. and after
git push
I run commendcap deploy
. Then it show message like this:
As the message suggests it’s having trouble building the native extension for bcrypt-ruby. You’ll get a better error message by looking at /home/deployer/apps/get-real/shared/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out but the underlying is probably 1 (or more) of the following:
-
you don’t have a compiler/toolchain installed (gcc and so on)
-
you don’t have the headers for ruby itself installed (sometimes package managers install this separately as ruby-devel or similar)
-
you don’t have a library (or the headers for that library) that bcrypt-ruby depends on (I don’t know if there are any)
The output from the build attempt should clarify which of these apply
Fred