You need to override the cap setup method.

-Matt

Sent from my iPhone

On Jan 21, 2009, at 18:15, Carl Porth <[email protected]> wrote:

>
> More specifically thor barfs with:
>
>  * executing "cd /var/www/merb-app/releases/20090122010708; bin/thor
> merb:gem:redeploy"
>    servers: ["igor"]
>    [igor] executing command
> *** [err :: igor] /usr/local/lib/site_ruby/1.8/rubygems.rb:636:in
> `report_activate_error': Could not find RubyGem thor (>= 0)
> (Gem::LoadError)
> *** [err :: igor] from /usr/local/lib/site_ruby/1.8/rubygems.rb:141:in
> `activate'
> *** [err :: igor] from /usr/local/lib/site_ruby/1.8/rubygems.rb:49:in
> `gem'
> *** [err :: igor] from bin/thor:30
>
> This is because the default merb .gitignore file no longer includes
> thor in the git repo.  This was changed in the following commit:
> http://github.com/wycats/merb/commit/7243f0a6fb16f03c5b5e255f095c91ced9654e06
>
> So either you are supposed to include (a deployed) thor in your
> application's git repo or you are supposed to rely on thor being
> installed on the deployed to system.  Which is the best practice?
>
> Thanks,
> Carl
>
> On Jan 21, 4:57 pm, Carl Porth <[email protected]> wrote:
>> Right, I'm using this method of redeploying native gems.  However,
>> what happens on the first deploy?  bin/thor won't work because it
>> hasn't been redeployed.
>>
>> Thanks,
>> Carl
>>
>> On Jan 21, 4:31 pm, Matt Aimonetti <[email protected]> wrote:
>>
>>> Here is my recipe for the merb book.
>>
>>> set :application, "app"
>>> set :repository,  "git://github.com/mattetti/app.git"
>>
>>> # If you aren't deploying to /u/apps/#{application} on the target
>>> # servers (which is the default), you can specify the actual  
>>> location
>>> # via the :deploy_to variable:
>>> set :deploy_to, "~/merb-apps/#{application}"
>>
>>> # If you aren't using Subversion to manage your source code, specify
>>> # your SCM below:
>>> set :scm, :git
>>> set :git_shallow_clone,     1
>>> set :git_enable_submodules, 1
>>> set :deploy_via,            :remote_cache
>>> set :repository_cache,      "#{application}-src"
>>> set :ssh_options,           :forward_agent => true
>>> set :keep_releases,         3
>>> set :use_sudo,              false
>>
>>> set :user,                  "mattetti"
>>> # set :password,              ""
>>
>>> # comment out if it gives you trouble. newest net/ssh needs this  
>>> set.
>>> ssh_options[:paranoid] = false
>>
>>> role :app, "18.47.26.192"
>>> role :web, "18.47.26.192"
>>> role :db,  "18.47.26.192", :primary => true
>>
>>> #
>>> # ==== Merb variables
>>> #
>>
>>> set :merb_adapter,     "mongrel"
>>> set :merb_environment, ENV["MERB_ENV"] || "production"
>>> set :merb_port,        5500
>>> set :merb_servers,     3
>>
>>> after "deploy:update_code", "symlink:symgem"
>>> after "symlink:symgem","deploy:native_gems"
>>> after "deploy:symlink", "deploy:add_timestamp"
>>
>>> namespace :symlink do
>>>   desc "symlinks gems/gems"
>>>   task :symgem, :roles => :app do
>>>     run "ln -s #{shared_path}/gems/gems #{latest_release}/gems/gems"
>>>   end
>>> end
>>
>>> namespace :deploy do
>>
>>>   # nginx -c ~/etc/nginx.conf
>>
>>>   desc "stops application server"
>>>   task :stop do
>>>     run "cd #{latest_release}; bin/merb -K all"
>>>   end
>>
>>>   desc "starts application server"
>>>   task :start do
>>>     run "cd #{latest_release}; bin/merb -a #{merb_adapter} -p  
>>> #{merb_port}
>>> -c #{merb_servers} -e #{merb_environment}"
>>>   end
>>
>>>   desc "recompile native gems"
>>>   task :native_gems do
>>>     run "cd #{latest_release};bin/thor merb:gem:redeploy"
>>>   end
>>
>>>   desc "restarts application server(s)"
>>>   task :restart do
>>>     deploy.stop
>>>     deploy.start
>>>   end
>>
>>>   desc "Restart apache"
>>>   task :restart_apache, :roles => :web do
>>>     sudo "svcadm restart apache"
>>>   end
>>
>>>   desc "add a timestamp"
>>>   task :add_timestamp do
>>>     run "cd #{latest_release}; ./bin/rake add_timestamp"
>>>   end
>>
>>> end
>>
>>> On Wed, Jan 21, 2009 at 4:53 PM, Carl Porth <[email protected]>  
>>> wrote:
>>
>>>> How can one use the bundled version of thor to redeploy your gems  
>>>> when
>>>> in order to use a bundled gem it has to be redeployed?  (That was a
>>>> mouthful.)  Seems like a chicken/egg sort of problem.  What best
>>>> practice should I be using?
>>
>>>> Thanks,
>>>> Carl
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to