Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post_setup doesn't run when gems are missing #1

Closed
sandro opened this issue Aug 1, 2010 · 5 comments
Closed

post_setup doesn't run when gems are missing #1

sandro opened this issue Aug 1, 2010 · 5 comments

Comments

@sandro
Copy link

sandro commented Aug 1, 2010

Been having fun with whiskey_disk tonight but one reoccurring problem is that the hooks are dependent on rake working. I'm using rails 3 which uses bundler. Ideally, my post_setup task would run a bundle install (to install rails and the rest of the environment) but of course, bundler aborts the mission when its dependencies haven't been installed. I'd be great to have another hook which enqueues commands that get run before the post_setup task is invoked. The post_deploy task suffers from the same problem which manifests itself when you've updated your Gemfile and rake refuses to load.

I suppose the baked-in solution is to create a config repo but I'm too lazy to maintain two repos for this tiny project. I could probably also rescue LoadErrors in my Rakefile but that doesn't seem right either. Anyways, Whiskey Disk is pretty damn exciting... and fast! Great job.

@flogic
Copy link
Collaborator

flogic commented Aug 3, 2010

Hmmm. Trying to get a clear picture of what's happening here. Might need to see some hot gist action to fully get the flow (and hence the problem). What you got?

Thanks, btw,
Rick

@sandro
Copy link
Author

sandro commented Aug 3, 2010

The simplest test is to create a new rails 3 project, define a post_setup hook, deploy it to a server that only has the bundler gem installed (rails 3 not installed), run rake deploy:setup. The rake task will fail because it runs Bundler.setup which fails because the dependencies haven't been met. Note: my post_setup hook runs 'bundle install' among other things.

@sandro
Copy link
Author

sandro commented Aug 3, 2010

Just to be clear, the remote rake task fails because bundler's dependencies aren't met.

@rick
Copy link
Member

rick commented Aug 3, 2010

So, being a novice on rails3 (and someone who has aliased 'bungle' for 'bundle' in .bash_profile), what should the Right thing be -- should rails3 .gems be bundled with the app and then the rake script runs "bundle setup --deploy" (or whatever)?

I'm probably missing the point. Hey, are you on irc? :-)

@flogic
Copy link
Collaborator

flogic commented Sep 7, 2010

This should be fixed in 0.5.0, with the addition of post_setup_script and post_deploy_script configuration options.

Let us know if this doesn't properly address the issue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants