我最近卸载了RailsInstaller并重新安装了最新的3.1.0版本,所以我有了一个更新的Ruby版本。所以现在我有ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]在Windows 7电脑上现在,当我在本地运行我的rails服务器时,它正常启动,没有错误。
=> Booting Thin
=> Rails 4.2.3 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on localhost:3000, CTRL+C to stop
当我打开我的浏览器localhost:3000主页打开没有任何问题但是我在控制台上看到了这个:
Started GET "/" for 127.0.0.1 at 2015-07-15 01:22:05 +0300
Processing by MainPagesController#home as HTML
Rendered main_pages/_goclick.html.erb (1.0ms)
Rendered main_pages/home.html.erb within layouts/application (286.0ms)
Rendered layouts/_header.html.erb (1.0ms)
Rendered layouts/_footer.html.erb (0.0ms)
Completed 200 OK in 1220ms (Views: 1220.1ms | ActiveRecord: 0.0ms)
Started GET "/assets/application.self.css?body=1" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/custom.self.css?body=1" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/main_pages.self.css?body=1" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/messages.self.css?body=1" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/jquery.self.js?body=1" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/jquery_ujs.self.js?body=1" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/main_pages.self.js?body=1" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/messages.self.js?body=1" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/zeroclipboard/ZeroClipboard.self.js?body=1" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/zeroclipboard/asset-path.self.js?body=1" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/zeroclipboard.self.js?body=1" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/application.self.js?body=1" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/application.js" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/logo.png" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/banner_ad.png" for 127.0.0.1 at 2015-07-15 01:22:06 +0300
Started GET "/assets/dotted-gray.gif" for 127.0.0.1 at 2015-07-15 01:22:07 +0300
Started GET "/application.js" for 127.0.0.1 at 2015-07-15 01:22:07 +0300
Started GET "/assets/ZeroClipboard.swf?noCache=1436912527062" for 127.0.0.1 at 2015-07-15 01:22:07 +0300
Started GET "/application.js" for 127.0.0.1 at 2015-07-15 01:22:07 +0300
**ActionController::RoutingError (No route matches [GET] "/application.js"):**
actionpack (4.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (4.2.3) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.3) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.3) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.3) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.3) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.3) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.3) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.3) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.4) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.3) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
actionpack (4.2.3) lib/action_dispatch/middleware/static.rb:116:in `call'
rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
railties (4.2.3) lib/rails/engine.rb:518:in `call'
railties (4.2.3) lib/rails/application.rb:165:in `call'
rack (1.6.4) lib/rack/content_length.rb:15:in `call'
thin (1.6.3) lib/thin/connection.rb:86:in `block in pre_process'
thin (1.6.3) lib/thin/connection.rb:84:in `catch'
thin (1.6.3) lib/thin/connection.rb:84:in `pre_process'
thin (1.6.3) lib/thin/connection.rb:53:in `process'
thin (1.6.3) lib/thin/connection.rb:39:in `receive_data'
eventmachine (1.0.7) lib/eventmachine.rb:187:in `run_machine'
eventmachine (1.0.7) lib/eventmachine.rb:187:in `run'
thin (1.6.3) lib/thin/backends/base.rb:73:in `start'
thin (1.6.3) lib/thin/server.rb:162:in `start'
rack (1.6.4) lib/rack/handler/thin.rb:19:in `run'
rack (1.6.4) lib/rack/server.rb:286:in `start'
railties (4.2.3) lib/rails/commands/server.rb:80:in `start'
railties (4.2.3) lib/rails/commands/commands_tasks.rb:80:in `block in server'
railties (4.2.3) lib/rails/commands/commands_tasks.rb:75:in `tap'
railties (4.2.3) lib/rails/commands/commands_tasks.rb:75:in `server'
railties (4.2.3) lib/rails/commands/commands_tasks.rb:39:in `run_command!'
railties (4.2.3) lib/rails/commands.rb:17:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
Rendered D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (4.0ms)
Rendered D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/templates/routes/_route.html.erb (2.0ms)
Rendered D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/templates/routes/_table.html.erb (32.0ms)
Rendered D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (3.0ms)
Rendered D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within
rescues/layout (126.0ms)
Started GET "/assets/favicon16x16.ico" for 127.0.0.1 at 2015-07-15 01:22:08 +0300
我不确定在从1.9升级到Ruby 2.1之前我是否得到了这个"Routing Error.."
关键的新问题是,当我提交表单时,站点上没有输出,控制台显示数百行,我将在下面包括一些,然后它意外终止,rails服务器停止。
.
.
.
1300 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/validations/associated.rb
1301 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/validations/uniqueness.rb
1302 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/validations/presence.rb
1303 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/validations.rb
1304 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activemodel-4.2.3/lib/active_model/callbacks.rb
1305 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/counter_cache.rb
1306 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/locking/optimistic.rb
1307 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/locking/pessimistic.rb
1308 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/core_ext/module/method_transplanting.rb
1309 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/attribute_methods/read.rb
1310 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/attribute_methods/write.rb
1311 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/attribute_methods/before_type_cast.rb
1312 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/attribute_methods/query.rb
1313 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/attribute_methods/primary_key.rb
1314 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/attribute_methods/time_zone_conversion.rb
1315 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activemodel-4.2.3/lib/active_model/dirty.rb
1316 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/attribute_methods/dirty.rb
1317 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/timestamp.rb
1318 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/attribute_methods/serialization.rb
1319 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/callbacks.rb
1320 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/associations.rb
1321 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/autosave_association.rb
1322 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/associations/builder/association.rb
1323 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/nested_attributes.rb
1324 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/aggregations.rb
1325 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb
1326 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/no_touching.rb
1327 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/reflection.rb
1328 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activemodel-4.2.3/lib/active_model/serialization.rb
1329 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activemodel-4.2.3/lib/active_model/serializers/json.rb
1330 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activemodel-4.2.3/lib/active_model/serializers/xml.rb
1331 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/serializers/xml_serializer.rb
1332 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/serialization.rb
1333 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/store.rb
1334 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/statement_pool.rb
1335 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/arel-6.0.2/lib/arel/visitors/bind_visitor.rb
1336 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/savepoints.rb
1337 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/sqlite3_adapter.rb
1338 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/runtime_registry.rb
1339 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/globalid-0.3.5/lib/global_id/identification.rb
1340 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/base.rb
1341 D:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/transaction.rb
1342 D:/rails_projects/tafqit/app/controllers/counted.rb
1343 D:/rails_projects/tafqit/app/controllers/tafqit.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]在Windows下是否有任何已知问题?你推荐我做什么,我是新手,所以请原谅我。
我找到了问题的原因。它是其他Ruby版本的旧安装。有一次我删除了它们。