Bundler inside gem

85 views
Skip to first unread message

seban

unread,
Nov 9, 2010, 1:48:33 PM11/9/10
to ruby-bundler
I have a problem with gem which jak wrote. I had in my mine gem file
code:
require "rubygems"
require "bundler"
Bundler.setup
Bundler.require(:default).

This works only if my current directory have some Gemfile. In
directory without Gemfile is raises exception
Bundler::GemfileNotFound: Could not locate Gemfile. What I do wrong?
Is bundle not suitable for using inside of gems?

Andre Arko

unread,
Nov 9, 2010, 1:53:21 PM11/9/10
to ruby-b...@googlegroups.com
On Nov 9, 2010, at 10:48 AM, seban wrote:
>
> Is bundle not suitable for using inside of gems?

Correct. Don't do this, it's wrong. Inside a gem, just require the libraries that you need.

— Andre

Alex Chaffee

unread,
Nov 9, 2010, 2:06:48 PM11/9/10
to ruby-b...@googlegroups.com
You can use Bundler for *developing* your gem, e.g. in your rakefile
or test helper. Just keep it out of your lib dir.

Sent from my iPhone

> --
> You received this message because you are subscribed to the Google
> Groups "ruby-bundler" group.
> To post to this group, send email to ruby-b...@googlegroups.com.
> To unsubscribe from this group, send email to ruby-bundler...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/ruby-bundler?hl=en
> .
>

Reply all
Reply to author
Forward
0 new messages