Claudio Poli 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!


-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to