Undefined method `instance' for Capistrano::Configuration:Class

前端 未结 3 1282
说谎
说谎 2021-01-11 11:47

I am trying to get Capistrano up and running for the first time in a rails app. I have a linux server running Ubuntu 12.04, nginx, unicorn and rails, however, I seem to be r

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-11 12:44

    First of all, there were a couple of changes made in capistrano 3. See the release notes : http://www.capistranorb.com/2013/06/01/release-announcement.html

    Also go through the readme. https://github.com/capistrano/capistrano/blob/master/README.md

    Capistrano 3 has moved out bundler integration into a gem.To solve your problem :

     1. Uncomment require 'capistrano/bundler' from capify. 
     2. add gem 'capistrano-bundler' to your gemfile.
     3. Go through the comments in capify file and uncomment whichever module you require.
    

    Oh and if you don't wanna use bundler as of yet, remove the first line : require "bundler/capistrano". easy as that.

    Also you can't use variables like the previous way now.Instead of directly reading it, use fetch(:application) to read a variable.

    I would be easier for you to move back to capistrano v2.

提交回复
热议问题