gem in path

G

ggarra13

I have an application as a gem file that I want a copy to have installed in the user's path directory upon gem install, similar to rake. I would like to know how to do that for my application.
 
D

DON Who is a ghost

Have you checked out bundler?

http://bundler.io

it's fairly great at manageing gem dependencies. You specify your gems
in the `Gemfile` run the `bundle install` command and boom. ready to go!

Generaly, I prefer to use the `require "bundler/setup"` method.

In in the first file you load in your app do:

require "bundler/setup"
Bundler.require:)default)

That will require all of the gems in you gemfile. You can also in your
`Gemfile` do do:

group :development do #or any symbol that you want to lable it with
#gem "whatever_you_need"
…
end

and in your app:

Bundler.require:)development)

And all of the gems will be required. this is really useful if your
useing something like rack or sinatra to conditionaly require your gems
for :testing, :development, or :production conditonaly.

1. `gem install bundler`
2. `bundle init` in your project root dir
3. specify your gems in `Gemfile`
4. `bundle install` in your project root

If you later add a new depedency then `bundle update` to rebuild the
dependencys

When a user aqquires your code, they just have to `bundle install` and
then start your app however you have designed that to work.
 
G

ggarra13

Have you checked out bundler?

I just checked it, but it adds yet another step to the process of installing a gem which is what I am trying to avoid. I am looking for something that will install the application directly like rake.
 
G

ggarra13

On Sunday, September 22, 2013 11:22:59 AM UTC-3, DON Who is a ghost wrote:

Never mind. I found that Gem::Specification supports an executable string which does the install.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,477
Members
44,898
Latest member
BlairH7607

Latest Threads

Top