# Mongrel and thin Server only in Development envirement

**URL:** <https://www.ruby-forum.com/t/mongrel-and-thin-server-only-in-development-envirement/156822>\
**Category:** Rails\
**Created:** [January 3, 2009, 4:18pm UTC](https://www.ruby-forum.com/t/mongrel-and-thin-server-only-in-development-envirement/156822 "2009-01-03T16:18:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaosbanane](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chaosbanane](https://www.ruby-forum.com/u/chaosbanane)\
**Post date:** [January 3, 2009, 4:18pm UTC](https://www.ruby-forum.com/t/mongrel-and-thin-server-only-in-development-envirement/156822/1 "2009-01-03T16:18:54Z")

</div>

Hi

what could be the reasen, that I only can start the mongrel or the thin  
server if i set the envirement on development?

On development -\> everything works fine.

On production:

andreasP:/var/www/web1/aekschen# mongrel\_rails cluster::start  
starting port 82  
andreasP:/var/www/web1/aekschen# mongrel\_rails cluster::start  
starting port 82  
andreasP:/var/www/web1/aekschen# mongrel\_rails cluster::stop  
already stopped port 82

This is the Mongrel LOG:

\*\* Daemonized, any open files are closed. Look at  
tmp/pids/mongrel.82.pid and log/mongrel.82.log for info.  
\*\* Starting Mongrel listening at 78.47.xx.xx:82  
\*\* Starting Rails with production environment…  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require': /var/www/web1/aekschen/app/controllers/tourscheduler_users_controller.rb:95: syntax error, unexpected kEND, expecting $end (SyntaxError) 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/activesupport-2.2.2/lib/active\_support/dependencies.rb:155:in  
`require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:262:in`require\_or\_load’  
from  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active\_support/dependencies.rb:221:in  
`depend_on' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:133:in`require\_dependency’  
from  
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:368:in  
`load_application_classes' from /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:367:in`each’  
from  
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:367:in  
`load_application_classes' from /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:365:in`each’  
from  
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:365:in  
`load_application_classes' from /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:185:in`process’  
from  
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in  
`send' from /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in`run’  
from /var/www/web1/aekschen/config/environment.rb:13  
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/mongrel-1.1.5/bin/…/lib/mongrel/rails.rb:147:in  
`rails' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:113:in`cloaker\_’  
from  
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/…/lib/mongrel/configurator.rb:149:in  
`call' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in`listener’  
from  
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel\_rails:99:in  
`cloaker_' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in`call’  
from  
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/…/lib/mongrel/configurator.rb:50:in  
`initialize' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in`new’  
from  
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel\_rails:84:in  
`run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in`run’  
from  
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel\_rails:281  
from /usr/local/bin/mongrel\_rails:19:in `load’  
from /usr/local/bin/mongrel\_rails:19

I dont know what the syntax error means. There is no “end” to much. And  
i only changed the server, it works on the other one. The only thing is  
that i have a new version of rails now. I have already replaced the old  
config files with those from a new rails project.

any ideas?

greetings Andi

---

<div class="post-metadata">

**Author:** ![chaosbanane](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chaosbanane](https://www.ruby-forum.com/u/chaosbanane)\
**Post date:** [January 3, 2009, 5:22pm UTC](https://www.ruby-forum.com/t/mongrel-and-thin-server-only-in-development-envirement/156822/2 "2009-01-03T17:22:44Z")

</div>

On 3 Jan 2009, at 15:18, Andi G. wrote:

> \*\* Daemonized, any open files are closed. Look at  
> tmp/pids/mongrel.82.pid and log/mongrel.82.log for info.  
> \*\* Starting Mongrel listening at 78.47.xx.xx:82  
> \*\* Starting Rails with production environment…  
> /usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
> `gem\_original\_require’:  
> /var/www/web1/aekschen/app/controllers/  
> tourscheduler\_users\_controller.rb:95:  
> syntax error, unexpected kEND, expecting $end (SyntaxError)

Sounds like you have a syntax error in that file. In production mode  
in rails 2.2 all application classes are loaded up front (and so a  
syntax error in any of them will stop the server starting, whereas in  
previous versions you would only hit that error when you caused that  
file to be loaded.

Fred

>

---

<div class="post-metadata">

**Author:** ![chaosbanane](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chaosbanane](https://www.ruby-forum.com/u/chaosbanane)\
**Post date:** [January 3, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/mongrel-and-thin-server-only-in-development-envirement/156822/3 "2009-01-03T19:36:49Z")

</div>

> In production mode  
> in rails 2.2 all application classes are loaded up front (and so a  
> syntax error in any of them will stop the server starting, whereas in  
> previous versions you would only hit that error when you caused that  
> file to be loaded.

Okay thanks a lot! The version info was very helpfull! There was a  
simple syntax error. 🙂

I love this community…

greetings andi
