Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

I don't know where to place "Bundler.require(:default)" in non-rail's applications #905

Closed
pabloq opened this issue Dec 16, 2010 · 3 comments

Comments

@pabloq
Copy link

pabloq commented Dec 16, 2010

Hi,

I'm a beginner using bundler. I have generated a bundler gem project using "bundle install" and "rake install" but I don't know where to place bundler requirements. I got the following error:

C:/Ruby/lib/ruby/gems/1.8/gems/iline_lookup-0.0.2/lib/iline_lookup.rb:2: private method require' called for Bundler:Module (NoMethodError) from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:ingem_original_require'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from ll2_retriever_runner.rb:3

I put it in the first line of my application like this:

require 'bundler/setup'
Bundler.require(:default)

Thanks

@ghost
Copy link

ghost commented Dec 16, 2010

If you do Bundler.require anyway you can omit "bundler/setup" and simply require "bundler"

@indirect
Copy link
Member

If you are building a gem, you cannot use Bundler.require. As soon as you do that, you no longer have a gem, you have an application, and you can't package it as a gem.

@pabloq
Copy link
Author

pabloq commented Dec 16, 2010

Thank you very much, that was the problem! I was building a gem.

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

No branches or pull requests

2 participants