require in capistrano deploy.rb cannot find file

前端 未结 2 2092
清酒与你
清酒与你 2021-02-09 04:55

I have a rails 3.0.5 app and I\'m setting up capistrano to use a recipe.

in my config directory I have a file named \"database_capistrano.rb\" and in my deploy.rb, also

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-09 05:15

    For future visitors, I got better results with the answer found in Capistrano: deploy.rb file refactoring

    i.e instead of require, use load. As long as that file is a gem in the bundle or a file that requires other gems that are in bundle, this will work.

    To be frank, I didn't try the accepted answer, half because it looked a little workaround-ish, and half because I didnt fully understand how to adapt it for my situation

提交回复
热议问题