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

katon and RVM - not finding gems? #32

Closed
omarvelous opened this issue Sep 30, 2014 · 4 comments
Closed

katon and RVM - not finding gems? #32

omarvelous opened this issue Sep 30, 2014 · 4 comments

Comments

@omarvelous
Copy link

Having an issue using katon with rvm. Using the following:

rvm use ruby-2.0.0-p576 && katon add 'bundle exec unicorn -p 9999'

Getting the following:

/Users/omarvelous/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/gems/2.0.0/gems/bundler-1.7.3/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find rake-10.3.2 in any of the sources (Bundler::GemNotFound)

It seems to be looking in the wrong spot for the gems? Not sure what's going on. Any guidance?

Omar

@typicode
Copy link
Owner

Hi Omar,

Thanks for reporting this issue. I've installed everything and I'm having the same problem. It's a katon issue.

Actually, when you add a server, katon stores PATH environment variable. However, it would need to store GEM_PATH too.

Here's a temporary workaround.

Run rvm info environment, copy GEM_PATH.

Add it manually to your host configuration file.

// ~/.katon/hosts/<your_app_name>.json
{
   //...
  "env" : {
    "PATH": "...",
    "GEM_PATH": "..." // Paste your GEM_PATH here
  }
}

katon will reload your app automatically.

As a side node, with rbenv and rails server command, there should be no need to add GEM_PATH.

@omarvelous
Copy link
Author

Awesome... It's good to go now!

@typicode
Copy link
Owner

typicode commented Oct 6, 2014

Just as an update. I've added a --env option.

You can simply do:

rvm use ruby-2.0.0-p576 && katon add 'bundle exec unicorn -p $PORT' --env GEM_PATH

And GEM_PATH will be copied.

@omarvelous
Copy link
Author

Awesome!

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