Closed synth closed 8 years ago
That is weird. I haven't used Sinatra in a long time, but my guess is that Sinatra adds some before
hooks into Rake that are getting picked up. Except they do different things than capistrano.
This line in particular: https://github.com/phallstrom/slackistrano/blob/master/lib/slackistrano/tasks/slack.rake#L121
before 'deploy:updating', 'slack:deploy:updating'
require: false
on it?As for lack of errors, that is strange. Capistrano should be logging those in more detail somewhere. I think.
slackistrano does have require: false in our Gemfile,and is just in the main group, ie not assigned to development, test or production. Its cool. We can close this, but I wanted to document the issue and make you aware.
I put gem 'slackistrano'
in main group of my Gemfile,this wired error comes out(sinatra
is also in main group).
I commented out before "bundle_rsync:rsync_release", "precompile"
line in lib/tasks/hoge.rake and it worked.
This is super weird, brace yourself.
After installing slackistrano to my app, deployments to our staging server were crashing. Capistrano did not give any useful info other than it was crashing during any rails task such as precompiling or migrating with an error such as:
After much hair pulling, I finally figured out that SSHKit was crashing on the following command
I logged into staging and ran it and low and behold:
What the hell is Sinatra doing there and why is it being called?
I then realized that my app had some gems in production that weren't supposed to be there(mailcatcher) that were using Sinatra. I moved them over to development, and boom, back in business.
However, this highlights a bigger issue that there seems to be a name collision with Capistrano and Sinatra.
I'm reporting this in Slackistrano for two reasons. One I discovered it while using this gem. Also, and more importantly because I'm wondering if there could be a better way to show errors to the console while loading Slackistrano during a deployment.