macournoyer / thin

A very fast & simple Ruby web server
https://rubygems.org/gems/thin
2.27k stars 351 forks source link

Thin server not starting #83

Closed nogeek closed 10 years ago

nogeek commented 12 years ago

Thin just seems to shut down on me as soon as it starts up. The trace is as follows:

$ thin start --debug
>> Using rack adapter
/Users/nogeek/.rvm/gems/ruby-1.9.3-head/gems/activesupport-3.2.0.rc2/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Debugging ON
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
$

The same happens with script/rails server

My gemfile is below:

source 'http://rubygems.org'

# Bundle edge Rails instead:
gem "rails", "~> 3.2.0.rc2"

group :assets do
  gem 'sass-rails', '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.0'
  gem 'uglifier'
  gem 'compass', '~> 0.12.alpha'
  gem "compass-susy-plugin", :git => "git://github.com/ericam/compass-susy-plugin.git"
end

gem 'sass', '~> 3.1.10'
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.0'
gem 'uglifier'
gem 'compass', '~> 0.12.alpha'
gem "compass-susy-plugin", :git => "git://github.com/ericam/compass-susy-plugin.git"

group :development do
  gem "webrick"
  gem "thin"
  gem 'unicorn'
  gem 'capistrano'
  gem 'capistrano-ext'
  gem 'mailcatcher'
end

# == chat application if had time would be seperate application
gem "activesupport-slices", "~> 0.0.2"
gem "chat", :path => "chat"
gem "live_discussions", :path => "live_discussions"

gem "mail"
gem "premailer"
gem "premailer-rails3"

gem "simple_form", "~> 1.5.2"
gem "mongoid", "~> 2.4.0", :git => "git://github.com/mongoid/mongoid.git"
gem "devise", "~> 1.4.2"
gem "inherited_resources", "~> 1.3.0"
gem "haml", "~> 3.2.0.alpha.5"
gem "bson_ext", "~> 1.5.1"
gem "omniauth", "~> 0.3.0"
gem "oa-openid", "~> 0.3.0", :require => 'omniauth/openid'
gem 'rack-cache', :require => 'rack/cache'
gem 'dragonfly', '~>0.9.8'
gem "fog"
gem "hashie", "~> 1.0.0"
gem "tire", "~> 0.3.8"
gem "yajl-ruby", "~> 0.8.2"
gem "canable", "~> 0.3.0"
gem "countries", "0.3.0"
gem "kaminari", "~> 0.12.4"
gem "mongoid_slug", "~> 0.8.1"
gem "mongoid_taggable", "~> 0.1.7"
gem "voteable_mongo", "~> 0.9.2"
gem "state_machine", "~> 1.1.1"
gem "sucker", "~> 2.1.0"
gem "rails_autolink", "~> 1.0.2"
gem "redis", "~> 2.2.2"
gem "gibbon", "~> 0.3.0"
gem "whenever", "~> 0.7.0"
gem "recurrence", "~> 1.0.2"

# == javascript
gem 'jquery-rails'
gem "exception_notification"

# == Testing
gem "rspec-rails", "~> 2.6.1", :group => [:development, :test]

group :test do
  gem 'turn', :require => false
  gem "database_cleaner", "0.6"
  gem "test-unit"
  gem "fuubar"
  gem 'spork',                  '~> 0.9.0.rc9'
  gem 'launchy'
  gem "rspec", "~> 2.6.0"
  gem "autotest"
  gem "factory_girl", "~> 2.2.0"
  gem "capybara", "~> 1.0.0"
  gem "capybara-webkit", "~> 0.7.1"
  gem "guard-rspec", "~> 0.4.2"
  gem "vcr", "~> 1.10.0", :require => false
  gem "webmock", "~> 1.7.0", :require => false
  gem "faker", "~> 0.9.5"
  gem "timecop", "~> 0.3.5"
end

gem "recaptcha", :require => "recaptcha/rails"

and the config.ru is below:

# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment',  __FILE__)
run MyApplicationName::Application
thephw commented 12 years ago

What's in your database.yml?

nogeek commented 12 years ago

Actually using MongoDB with Mongoid but the database.yml is still there as:

#SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000
nogeek commented 12 years ago

the mongoid.yml:

development:
  host: localhost
  database: thedb_development
  identity_map_enabled: false

frontend:
  host: localhost
  database: thedb_development
  identity_map_enabled: true

test:
  host: localhost
  database: thedb_test
  identity_map_enabled: true

staging:
  database: thedb_staging
  identity_map_enabled: true

production:
  database: thedb_prod
thephw commented 12 years ago

Can't swear to it, but comment out the code in the database.yml file. Might be trying to load the connection to sqlite3 that is not in your gemfile.

nogeek commented 12 years ago

I commented out the database.yml but same problem unfortunately

SQLite version 3.x

gem install sqlite3

Ensure the SQLite 3 gem is defined in your Gemfile

gem 'sqlite3'

development:

adapter: sqlite3

database: db/development.sqlite3

pool: 5

timeout: 5000

Warning: The database defined as "test" will be erased and

re-generated from your development database when you run "rake".

Do not set this db to the same as development or production.

test:

adapter: sqlite3

database: db/test.sqlite3

pool: 5

timeout: 5000

production:

adapter: sqlite3

database: db/production.sqlite3

pool: 5

timeout: 5000

macournoyer commented 12 years ago

Still get this?

DanBradbury commented 10 years ago

I am having a similar issue myself when trying to pass in options to thin.

When I run thin start things go as planned but if I pass in any other options (outside of -e, -p) my thin instance will hang or say that its started the server but with upon looking for the process it doesn't exist.

I have seen elsewhere that there is a suggestion to upgrade to 1.6 but for our application we do not have that option because of the rack dependencies.

macournoyer commented 10 years ago

I just fixed the issue preventing to upgrade to 1.6. Try again please.

Closing this one as I don't think it's related.