joelmoss / strano

Capistrano and Github sittin' in a tree...
http://developwithstyle.com
MIT License
578 stars 70 forks source link

Project crash since it can't load newrelic recipes #10

Closed joshdvir closed 12 years ago

joshdvir commented 12 years ago

In my app I'm using newrelic_rpm gem that has a rake task but strano crash and I recive this error:

ActionView::Template::Error (cannot load such file -- new_relic/recipes): 31: <%- if resource.job_in_progress? -%> 32: <%= link_to 'JOB IN PROGRESS', [resource, resource.job_in_progress], :class => "label warning" %> 33: <%- else -%> 34: <%- if resource.cloned? && resource.repo.exists? && task = resource.cap.find_task(:deploy) %> 35: <%= link_to 'DEPLOY NOW...', new_project_jobs_path(resource, task.fully_qualified_name), :class => "btn success" %> 36: <%- end -%> 37: <%- end -%> /config/deploy.rb:3:in load' app/models/project.rb:108:inblock in cap' app/models/project.rb:107:in cap' app/views/projects/show.html.erb:34:in_app_views_projects_show_html_erb__166938183_86818670' app/controllers/projects_controller.rb:13:in `show'

Of course newrelic_rpm gem is installed.

nfm commented 12 years ago

I have the same issue when trying to load delayed/recipes:

# config/deploy/delayed_job.rb
require 'delayed/recipes'
after "deploy:stop", "delayed_job:stop"
after "deploy:start", "delayed_job:start"
after "deploy:restart", "delayed_job:restart"

This causes the following error in strano:

LoadError in Projects#show
cannot load such file -- delayed/recipes
nfm commented 12 years ago

Hm, you can fix this issue by adding the following to the strano Gemfile:

gem 'delayed_job', :require => nil

Or in your case, 'newrelic_rpm'.

Can't think of a better solution. Any thoughts, @joelmoss?

joshdvir commented 12 years ago

That did the trick.

Thanks.

joelmoss commented 12 years ago

Yeah that is the only known way to resolve this right now, but I'm working on a more elegant solution.