ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Bundler / Gemfile - Chili Install on Thin - Error

Added by Guy Saban at 2012-02-29 07:52 pm

Hi,

I think the following may possibly due to some issue with the Chili Bundler or Gemfile.

When in chiliproject root on our server and I invoke Chili on Webrick it seems to be working:

[root@213781-web1 chiliproject]# bundle exec script/server -p 3389 -e production -d
/usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:136: warning: Insecure world writable dir /var/www/vhosts in PATH, mode 040777
/usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:136: warning: Insecure world writable dir /var/www/vhosts in PATH, mode 040777
=> Booting WEBrick
=> Rails 2.3.14 application starting on http://0.0.0.0:3389

BUT when I try thin it fails.

thin start

Then get the following errors.

[root@213781-web1 chiliproject]# thin start
>> Using rails adapter
/usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:136: warning: Insecure world writable dir /var/www/vhosts in PATH, mode 040777
/usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:31:in `setup': You have already activated rack 1.4.1, but your Gemfile requires rack 1.1.3. Using bundle exec may solve this. (Gem::LoadError)
        from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:17:in `setup'
        from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler.rb:110:in `setup'
        from /var/www/vhosts/chili/chiliproject/config/../config/preinitializer.rb:30
        from /var/www/vhosts/chili/chiliproject/config/boot.rb:42:in `load'
        from /var/www/vhosts/chili/chiliproject/config/boot.rb:42:in `preinitialize'
        from /var/www/vhosts/chili/chiliproject/config/boot.rb:24:in `boot!'
        from /var/www/vhosts/chili/chiliproject/config/boot.rb:137
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /var/www/vhosts/chili/chiliproject/config/environment.rb:33
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/rack/adapter/rails.rb:37:in `load_application'
        from /usr/local/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/rack/adapter/rails.rb:23:in `initialize'
        from /usr/local/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/rack/adapter/loader.rb:48:in `new'
        from /usr/local/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/rack/adapter/loader.rb:48:in `for'
        from /usr/local/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/controllers/controller.rb:169:in `load_adapter'
        from /usr/local/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/controllers/controller.rb:73:in `start'
        from /usr/local/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/runner.rb:185:in `send'
        from /usr/local/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command'
        from /usr/local/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!'
        from /usr/local/lib/ruby/gems/1.8/gems/thin-1.3.1/bin/thin:6
        from /usr/local/bin/thin:19:in `load'
        from /usr/local/bin/thin:19

as you can see it reads

/usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:31:in `setup': You have already activated rack 1.4.1, but your Gemfile requires rack 1.1.3. Using bundle exec may solve this. (Gem::LoadError)

I removed rack1.4.1 but then I got other errors so I put it back.

I hope someone has some advice to help me check/fix this further.

All the best,
Guy


Replies (2)

RE: Bundler / Gemfile - Chili Install on Thin - Error - Added by Felix Schäfer at 2012-02-29 08:26 pm

Well, read the error message til the end? :-)

Using bundle exec may solve this.

That means you should run bundle exec thin start. IIRC the config.ru present on previous versions also led to problems, you should check that it's not present in your version.

RE: Bundler / Gemfile - Chili Install on Thin - Error - Added by Guy Saban at 2012-02-29 09:16 pm

Thanks.

That was the right approach.

I tried it and got:

[guy@213781-web1 chiliproject]$ bundle exec thin start
/usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:143:in `gem': thin is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
        from /usr/local/bin/thin:18

So I added to the Gemfile as follows:

gem "thin" 

Then tried:

bundle exec thin start

It worked.

Thanks.

But seems the webrick is a little faster. I am surprised about that.

(1-2/2)