"bundle package" does indeed create ./bundle/environment.rb but I
still get the error from passenger about extlib not found.
i also tried "bundle lock" yielding the same error.
still, the modification to config.ru below is what works for me:
require File.expand_path('../.bundle/environment', __FILE__)
#require File.expand_path('../gems/environment', __FILE__)
I should add that I am using ruby 1.8.7. i read a post somewhere that
about ruby 1.9 and the same extlib problem. perhaps upgrading to 1.9
would help here?
complete config.ru (generated by dummy app that i copied over to my
existing project):
begin
# Try to require the preresolved locked set of gems.
#require File.expand_path('../.bundle/environment', __FILE__)
require File.expand_path('../gems/environment', __FILE__)
rescue LoadError
# Fall back on doing an unlocked resolve at runtime.
require "rubygems"
require "bundler"
Bundler.setup
end
require 'merb-core'
Merb::Config.setup(
:merb_root => File.expand_path(File.dirname(__FILE__)),
:environment => ENV['RACK_ENV']
)
Merb.environment = Merb::Config[:environment]
Merb.root = Merb::Config[:merb_root]
Merb::BootLoader.run
On May 9, 7:03 pm, Tony Mann <[email protected]> wrote:
> I am using Passenger. Just do a "bundle package" to create the
> .bundle/environment.rb file.
>
> ..tony..
>
>
>
>
>
> On Sun, May 9, 2010 at 3:59 PM, Pavel Kunc <[email protected]> wrote:
> > Hi,
>
> > I'm not familiar with the Passenger but I do use Unicorn on the
> > production and Thin during the development. I have groups in my
> > Gemfile for production and development.
>
> > That should give you gems only for production and only for
> > development. However it still installs Mongrel on your production
> > server, but won't use it, as mentioned by Michishinge.
>
> > Adding explicit extlib dependency doesn't feel right to me because
> > merb-core requires extlib explicitly and the gem depends on the extlib
> > as well. So it seems that the problem is with initializing the Bundler
> > environment so the extlib is not found. Does your config.ru looks
> > similar tohttp://gist.github.com/305490?
>
> > The files in the .bundle directory are created when you call budle
> > lock, locked bundle will create those files.
>
> > Would anybody be willing to create the Passenger page on the wiki? It
> > seems we need that quite a lot.
>
> > Pavel
>
> > On May 9, 1:34 pm, Michishige Kaito <[email protected]> wrote:
> > > I don't think so. I was thinking of your development process. You could
> > put
> > > mongrel (or whatever server you want to use in development) in a
> > development
> > > bundle group, so it won't be loaded when you run the app in production.
> > When
> > > you deploy you can also "bundle --without" and ignore the development
> > group
> > > on the production server completely.
>
> > > If memory serves me well, I had to add an explicit extlib dependency in
> > the
> > > Gemfile a while ago. Try that.
>
> > > 2010/5/9 Ming <[email protected]>
>
> > > > I don't actually want to deploy my app using mongrels, I am using
> > > > passenger.
>
> > > > However, do you think getting bundle exec to work with mongrels will
> > > > do the necessary configuration that will enable the use of passenger
> > > > with the default config.ru?
>
> > > > On May 8, 8:46 pm, Michishige Kaito <[email protected]> wrote:
> > > > > 2010/5/8 Ming <[email protected]>
>
> > > > > > "bundle exec merb" returns errors
>
> > > > > > "bundle exec bin/merb" tells me mongrel is not installed
>
> > > > > > but plain "bin/merb" works fine.
>
> > > > > > anyhow, passenger doesn't execute from the command line.
>
> > > > > Try bundle exec bin/merb -a thin if you have thin installed. Or
> > include
> > > > > mongrel into your bundle.
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "merb" group.
> > > > > To post to this group, send email to [email protected].
> > > > > To unsubscribe from this group, send email to
> > > > [email protected]<merb%[email protected]><
> > merb%[email protected]<merb%[email protected]>
> > >.
> > > > > For more options, visit this group athttp://
> > > > groups.google.com/group/merb?hl=en.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "merb" group.
> > > > To post to this group, send email to [email protected].
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<merb%[email protected]><
> > merb%[email protected]<merb%[email protected]>
> > >.
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/merb?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "merb" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > [email protected] <merb%[email protected]>.
> > > For more options, visit this group athttp://
> > groups.google.com/group/merb?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "merb" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected] <merb%[email protected]>.
> > For more options, visit this group at
> >http://groups.google.com/group/merb?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "merb" 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
> athttp://groups.google.com/group/merb?hl=en.
--
You received this message because you are subscribed to the Google Groups
"merb" 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/merb?hl=en.