1

I'm trying to load a custom module that is written in the /lib directory of Webistrano. In the recipe, I try variations of,

require 'lib/foo/bar'

at the top of my recipe, before using,

bar::foo_method(x, y)

When Webistrano attempts to laod the recipe, in the log it states:

Problem listing tasks of stage X: Problem loading custom recipe: no such file to load -- lib/foo/bar - /u/apps/webistrano/lib/webistrano/deployer.rb:171:in `load_stage_custom_recipes'

The file is definitely present as Rails.root/lib/foo/bar.rb

Within the tasks drop down, it states "Error" based off not being able to understand the recipe.

Apologies for using any non-standard terminology in regards to RoR/Webistrano. I'm still fairly new to Ruby/RoR.

achinda99
  • 5,020
  • 4
  • 34
  • 42

1 Answers1

0

I was able to finally solve this by a combination of a couple of different fixes. Webistrano, like any other Rails application, loads the modules in the lib directory on startup. During this process, if the files and modules are named according to Rails conventions, they will be loaded and available for use in the recipe without explicit need for a require.

achinda99
  • 5,020
  • 4
  • 34
  • 42