safaacar / rubycas-server

Automatically exported from code.google.com/p/rubycas-server
GNU Lesser General Public License v2.1
0 stars 0 forks source link

development gems are required in a production environment (but can't be found) #118

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using commit 69000222539610813130e0c1f6f3936707dfd325 of rubycas-server running 
under Apache + Passenger, the following Passenger error occurs when CAS tries 
to serve the (custom) login page:

Could not find rake-0.8.7 in any of the sources (Bundler::GemNotFound)

Looking into this, it seems that rubycas-server.gemspec is used to define all 
the dependencies and that dependences are split between those added via 
Gem::Specification#add_dependency and those added via 
Gem::Specification#add_development_dependency. However, though there the 
.gemspec file separates production from development dependencies, the require 
'bundler/setup' statement, as far as I can tell, tries to bring in all 
dependency groups rather than omitting the development dependency group would 
be best in this case.

So, there seem to be two problems, in order of priority:

1) Development gems are required to run rubycas-server even in production.
2) The gem source declared in Gemfile (http://rubygems.org) can't find the rake 
gem, and possibly other development dependencies.

Solving the first problem is necessary for CAS to be deployed in our 
environment as unnecessary dependencies are not allowed in any way. Solving the 
second problem would be nice and I'm interested in the solution, but it is not 
necessary for my deployment.

Original issue reported on code.google.com by lif...@puppetlabs.com on 3 Feb 2012 at 10:53

GoogleCodeExporter commented 9 years ago
Removing "require 'bundler/setup'" from config.ru seems to solve the immediate 
problem, but another problem immediately pops up - I'm not yet sure they are 
related so don't want to move forward without solving the first problem. In any 
case, code in rubycas-server shouldn't need to be modified before deploying to 
production.

Original comment by lif...@puppetlabs.com on 3 Feb 2012 at 10:56

GoogleCodeExporter commented 9 years ago
I'm using bundler 1.0.21.

Original comment by lif...@puppetlabs.com on 3 Feb 2012 at 10:58