Bundler 1.0.0 RC makes me crazy

Oh and I forgot to mention I also tried “bundle pack” - no luck.

Michael Hasenstein wrote:

ME TOO!

Michael Hasenstein wrote:

ME TOO!

SOLVED.

I copied my projects to my main machine and in the process cleaned up
the old ruby (1.9.2-head) since I now use the official 1.9.2(-p0)
instead and don’t like having useless files lying around. So I ended up
installing all gems fresh. I noticed there was no
.rvm/bin/passenger_ruby - and I read I shouldn’t use the ruby binary
directly in the passenger config.

I created passenger_ruby with “rvm 1.9.2 --passenger”, updated apache to
load the new passenger module (was in .rvm/…/1.9.2-head/… before,
as I said I now use 1.9.2-p0 and no longer svn head of ruby), MADE SURE
IT LOADS passenger_ruby(!) - passenger-install-apache2-module gives you
the direct link to the ruby binary which apparently is wrong, so don’t
copy&paste without looking at what it is!

Both my rails3 apps (different directories, same rvm/ruby/passenger)
work fine now.

No, that wasn’t the solution. Simply by ensuring passenger_ruby is
correct (exists, is correct, is used by passenger) did not solve this
problem for me - at least not on my laptop dev. system. The same setup
works on my desktop dev. machine. Same passenger, same rvm, same app,
same ruby - one works, the other one doesn’t.

Michael Hasenstein wrote:

Michael Hasenstein wrote:

ME TOO!

SOLVED.

Jacques Fuentes wrote:

This was not the issue for me either. When using bundle install
–deployment, everything works just fine, but this is a development
server and I do not want gems installed to vendor/bundle. The problem is
still with a gem specifying a git repo and a :ref (does not have a
gemspec).

I’m in the same boat, using Rails 2-3-stable (git) and Passenger
3.0.0-beta3.

If the gems aren’t in vendor/bundle passenger won’t start due to gem
installed and defined through :git

Michael Hasenstein wrote:

No, that wasn’t the solution. Simply by ensuring passenger_ruby is
correct (exists, is correct, is used by passenger) did not solve this
problem for me - at least not on my laptop dev. system. The same setup
works on my desktop dev. machine. Same passenger, same rvm, same app,
same ruby - one works, the other one doesn’t.

Michael Hasenstein wrote:

Michael Hasenstein wrote:

ME TOO!

SOLVED.

This was not the issue for me either. When using bundle install
–deployment, everything works just fine, but this is a development
server and I do not want gems installed to vendor/bundle. The problem is
still with a gem specifying a git repo and a :ref (does not have a
gemspec).

Yes, crazy is the word… Anyway, after some digging, my understanding
is that application code in e. g. rake expects a directory layout as
created by bundle install. In this case, that is bundle install
–deployment.

I have been able to resolve my issues my using the
vendor/bundle dirs created by bundle install --deployment and use them
as the shared gems. In this, there is special arrangements for git gems.
I guess it should be possible to generate the same structure manually,
but since it’s not documented I guess it’s likely to change.

After all, this is ruby :wink:

Claudio P. wrote:

Jacques Fuentes wrote:

This was not the issue for me either. When using bundle install
–deployment, everything works just fine, but this is a development
server and I do not want gems installed to vendor/bundle. The problem is
still with a gem specifying a git repo and a :ref (does not have a
gemspec).

I’m in the same boat, using Rails 2-3-stable (git) and Passenger
3.0.0-beta3.

If the gems aren’t in vendor/bundle passenger won’t start due to gem
installed and defined through :git

The problem is still there here as well, running Bundler 1.0.2, Rails
3.0.0 and Rubygems 1.3.7. All gems are installed system-wide as root, no
gems are installed in local user gem directories.

It happens particularly with this gem:

gem ‘thinking-sphinx’, ‘2.0.0.rc2’, :require => ‘thinking_sphinx’, :git
=> ‘git://github.com/freelancing-god/thinking-sphinx.git’, :branch =>
‘rails3’

Even if I install this gem by hand as root on the command line, the
problem remains. After running bundle install as root, I get:

Your bundle is complete! Use bundle show [gemname] to see where a
bundled gem is installed.

Then, when running any rake task in the Rails project with that Gemfile:

rake aborted!
git://github.com/freelancing-god/thinking-sphinx.git (at rails3) is not
checked out. Please run bundle install

But bundle install has run fine and the gem is installed as root.
Running “bundle show thinking-sphinx” as root:

/usr/lib/ruby/gems/1.8/bundler/gems/thinking-sphinx-644f57e2ac68

Running “bundle show thinking-sphinx” as non-root user:

git://github.com/freelancing-god/thinking-sphinx.git (at rails3) is not
checked out. Please run bundle install

This is wrong, since there is a system-wide copy of the gem available
that Bundler seems to be unable to see. When running “bundle install” as
normal user, Bundler seems to start to install things to /home/user/ and
then insists on receiving the user’s password in order to install it via
sudo, but since the local users are not allowed to use sudo, that
doesn’t work either.

We won’t give those users any sudoers privileges because they don’t need
them. They’re just local users set up to run the Rails web apps as.

We’re in a dead end then, gem install does install the gem just fine,
but Bundler doesn’t see this, while Bundler itself can’t install the gem
properly when running as root (?) and can’t install a local gem without
asking for sudo (?) unless using the --deployment option.

When running with the --deployment option, gems are installed into the
rails directory in vendor/bundle and this error disappears, but this is
wasteful because it means that each Rails app uses its own copy of the
gems instead of relying on the system-wide copies which may already be
in RAM. This causes a lot of unnecessary overhead that’s deadly in
situation with small servers (e.g. virtual servers).

Will it be possible to solve this issue with system-wide gems or is it
something on our side?

Prior to Bundler when working with config.gem instructions in the
config/environment.rb file of a Rails app, thinks worked fine with
system-wide gems.

Thanks!