System debian (na serwerze “obok” nie miałem problemu).
Świeży aplikacja, zrobiłem jedynie:
rails new xxx
rails g scaffold Users name:string password:string
rake db:migrate
rails s
rails server
Warning: You’re using Rubygems 1.8.23 with Spring. Upgrade to at least Rubygems 2.1.0 and run gem pristine --all
for better startup performance.
=> Booting Thin
=> Rails 4.1.8 application starting in development on http://0.0.0.0:3000
=> Run rails server -h
for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (–binding option)
=> Ctrl-C to shutdown server
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
Wchodzę na “stronę główną” http://10.0.0.4:3000/
Started GET “/” for 10.0.100.4 at 2014-12-09 15:49:54 +0100
ActiveRecord::SchemaMigration Load (0.2ms) SELECT schema_migrations
.* FROM schema_migrations
Processing by Rails::WelcomeController#index as HTML
Rendered vendor/bundle/ruby/1.9.1/gems/railties-4.1.8/lib/rails/templates/rails/welcome/index.html.erb (61.6ms)
Completed 200 OK in 159ms (Views: 131.6ms | ActiveRecord: 0.0ms)
Działa, wyświetla się. Wchodzę na użytkowników 10.0.0.4:300/users
Started GET “/users” for 10.0.100.4 at 2014-12-09 15:51:01 +0100
Processing by UsersController#index as HTML
User Load (0.3ms) SELECT users
.* FROM users
Rendered users/index.html.erb within layouts/application (2.6ms)
Unicestwiony
I serwer umiera. To samo przy /users/new/ W czym może być problem?
Gemfile:
source ‘https://rubygems.org’
gem ‘rails’, ‘4.1.8’
gem ‘sass-rails’, ‘~> 4.0.3’
gem ‘uglifier’, ‘>= 1.3.0’
gem ‘coffee-rails’, ‘~> 4.0.0’
gem ‘test_helper’
gem ‘jquery-rails’
gem ‘turbolinks’
gem ‘jbuilder’, ‘~> 2.0’
gem ‘sdoc’, ‘~> 0.4.0’, group: :doc
gem ‘spring’, group: :development
gem ‘jquery-turbolinks’
gem ‘debugger’, group: [:development, :test]
gem ‘dynamic_form’
gem ‘therubyracer’, :platforms => :ruby
gem ‘mysql2’
gem ‘thin’
if RUBY_VERSION =~ /1.9/ # assuming you’re running Ruby ~1.9
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
end
Wywaliłem ‘thin’ - dokładnie to samo.
ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
gem -v
1.8.23