Feature #450

Patch: enabling bundler support in the sinatra aps

Added by John Dewey over 10 years ago. Updated almost 10 years ago.

Status:ClosedStart date:12/15/2010
Priority:NormalDue date:
Assignee:Daniel Molina% Done:

0%

Category:-
Target version:Release 3.0
Resolution:fixed Pull request:

Description

I have patched occi-server.rb and econe-server.rb to use bundler if exists, otherwise fall-through to normal rubygem resolution.
There are a few caveats when using bundler, but I feel are reasonable to those that wish to use it.

  • The user provides a Gemfile in $ONE_LOCATION
  • The occi-server and econe-server commands need to be executed while in the $ONE_LOCATION directory (so bundler can pickup the .bundle/ directory)

I also added the knowledge of a ONE_ENV environment variable. This will allow users of bundler to require different gems under different opennebula
environments. Such as a production or development install.

Usage:

$ cd $ONE_LOCATION
$ cat Gemfile
source "http://rubygems.org"

gem "thin"
gem "sinatra"

$ bundle
Fetching source index for http://rubygems.org/
Installing daemons (1.1.0)
Installing eventmachine (0.12.10) with native extensions
Installing rack (1.2.1)
Installing tilt (1.1)
Installing sinatra (1.1.0)
Installing thin (1.2.7) with native extensions
Using bundler (1.0.7)

$ occi-server start
occi-server started

Thanks -
John

sinatra.patch Magnifier - sinatra patches for bundler (1.06 KB) John Dewey, 12/15/2010 01:50 AM

Associated revisions

Revision d0a79799
Added by Javi Fontan about 10 years ago

feature #450: added a bundler config file to install needed libraries

Revision 439df297
Added by Javi Fontan almost 10 years ago

feature #450: new Gemfile and installation helper script

Revision b8914f2d
Added by Javi Fontan almost 10 years ago

feature #450: added acct package to the Gemfile

Revision 0cac34ce
Added by Javi Fontan almost 10 years ago

feature #450: help and warning message for install_gems

Revision e6c9122f
Added by Javi Fontan almost 10 years ago

feature #450: now install_gems does not use bundler

Revision 697ac595
Added by Javi Fontan almost 10 years ago

feature #450: disable bundler gem checking

History

#1 Updated by Ruben S. Montero over 10 years ago

  • Target version deleted (Release 1.2.1)

#2 Updated by Ruben S. Montero over 10 years ago

  • Target version set to Release 3.0

#3 Updated by Ruben S. Montero almost 10 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Also available in: Atom PDF