Running capistrano does not load rails plugins. If you have your code
in vendor/plugins/elastic_rails/lib/elastic_rails.rb, you need to do,
in your config/deploy.rb:
$LOAD_PATH << "#{File.dirname(__FILE__)}/../vendor/plugins/
elastic_rails/lib"
require 'elastic_rails'
- Jamis
On Mar 28, 2007, at 6:35 AM, djsodom wrote:
>
> Hi,
>
> I'm trying to build a capistrano extension as a plugin. Capistrano
> doesn't seem to be able to find my module. For simplicity, in
> deploy.rb I have:
> --------------------
> require 'elastic_rails'
>
> task :test do
> aws.test
> end
>
> -------------------
>
> In my lib directory (for now), I have placed the following file
>
> #elastic_rails.rb
>
> require 'capistrano'
> module ElasticRails
> def test
> run "pwd"
> end
>
> end
>
> Capistrano.plugin :aws, ElasticRails
>
> -----------
> When I try to run 'cap test', I get a "no such file to load --
> elastic_rails (LoadError)"
>
> My goal is to have this as a plugin. To do that, I created a folder
> under vendor/plugins called 'elastic_rails'. In that folder I created
> a file called init.rb that has 'require capistrano' and the above
> module in it. That doesn't work either.
>
> I must be missing something simple.
>
> As a side question, I'll have some recipes I'll call in from the lib/
> directory in my plugin. Is that the best way to structure a cap
> plugin?
>
> Thanks,
>
> Steve
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---