Unusal loading error - ruby-on-rails-3.1

I am getting an unusual error which i dont know how to solve. Can any body please help.
My project takes a lot of time in loading.
Rendered /Users/Ahmad/.rvm/gems/ruby-1.9.2-p320#b_finder/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.9ms[2012-10-29 22:29:43] ERROR Errno::ECONNRESET: Connection reset by peer
/Users/Ahmad/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `eof?'
/Users/Ahmad/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `run'
/Users/Ahmad/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
Started GET "/assets/home.css?body=1" for 127.0.0.1 at 2012-10-29 22:29:43 +0530
Served asset /home.css - 304 Not Modified (3ms)
Started GET "/assets/list.css?body=1" for 127.0.0.1 at 2012-10-29 22:29:43 +0530
Served asset /list.css - 304 Not Modified (2ms)
Started GET "/assets/user.css?body=1" for 127.0.0.1 at 2012-10-29 22:29:43 +0530
Served asset /user.css - 304 Not Modified (2ms)
Started GET "/js/less.js" for 127.0.0.1 at 2012-10-29 22:29:43 +0530
ActionController::RoutingError (No route matches [GET] "/js/less.js"):
actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call'
railties (3.2.8) lib/rails/engine.rb:479:in `call'
railties (3.2.8) lib/rails/application.rb:223:in `call'
rack (1.4.1) lib/rack/content_length.rb:14:in `call'
railties (3.2.8) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
/Users/Ahmad/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/Users/Ahmad/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/Users/Ahmad/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
Rendered /Users/Ahmad/.rvm/gems/ruby-1.9.2-p320#b_finder/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.8ms)
I dont understand why it is giving such errors. One more thing ive noticed.
I ve used twitter bootstrap Tabbable nav for that js is required. But if i m not connected to internet then that tab is not work. Although i ve manually pasted the js and all files of bootstrap in assets pipeline.

Sounds like a loading error, in your case it can't find the less.js file.
Have you placed it in the correct position?
app -> assets -> javascript

Related

Rails 'parse_query' error on server in brand new app

I have installed on OS X 10.10.3:
homebrew, command line tools, then installed ruby using rbenv:
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
Rails 4.2.2
when I create a new app (with default sqlite database) and try to run it, it says:
=> Booting WEBrick
=> Rails 4.2.2 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2015-06-18 23:11:30] INFO WEBrick 1.3.1
[2015-06-18 23:11:30] INFO ruby 2.2.2 (2015-04-13) [x86_64-darwin14]
[2015-06-18 23:11:30] INFO WEBrick::HTTPServer#start: pid=41860 port=3000
but in the browser I see:
500 Internal Server Error
If you are the administrator of this website, then please read this web application's log file and/or the web server's log file to find out what went wrong.
log file:
Started GET "/" for ::1 at 2015-06-18 23:11:48 +0300
**ArgumentError (wrong number of arguments (2 for 1)):**
actionpack (4.2.2) lib/action_dispatch/http/request.rb:338:in `parse_query'
rack (1.6.3) lib/rack/request.rb:191:in `GET'
actionpack (4.2.2) lib/action_dispatch/http/request.rb:300:in `GET'
actionpack (4.2.2) lib/action_dispatch/http/parameters.rb:14:in `parameters'
actionpack (4.2.2) lib/action_dispatch/http/filter_parameters.rb:37:in `filtered_parameters'
actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:22:in `process_action'
actionpack (4.2.2) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.2.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.2.2) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.2) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.2) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.2.2) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.2) lib/action_controller/metal.rb:237:in `block in action'
actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:74:in `call'
actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:43:in `serve'
actionpack (4.2.2) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.2) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.2) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:819:in `call'
rack (1.6.3) lib/rack/etag.rb:24:in `call'
rack (1.6.3) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.3) lib/rack/head.rb:13:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.3) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.3) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.2) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in `call'
activerecord (4.2.2) lib/active_record/migration.rb:378:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.2) lib/active_support/callbacks.rb:88:in `call'
activesupport (4.2.2) lib/active_support/callbacks.rb:88:in `_run_callbacks'
activesupport (4.2.2) lib/active_support/callbacks.rb:776:in `_run_call_callbacks'
activesupport (4.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
web-console (2.1.3) lib/web_console/middleware.rb:37:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.2) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.2) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.2) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.2) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.2) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.3) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.3) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.3) lib/rack/lock.rb:17:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/static.rb:113:in `call'
rack (1.6.3) lib/rack/sendfile.rb:113:in `call'
railties (4.2.2) lib/rails/engine.rb:518:in `call'
railties (4.2.2) lib/rails/application.rb:164:in `call'
rack (1.6.3) lib/rack/lock.rb:17:in `call'
rack (1.6.3) lib/rack/content_length.rb:15:in `call'
rack (1.6.3) lib/rack/handler/webrick.rb:88:in `service'
/Users/smi/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
/Users/smi/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
/Users/smi/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
Rendered /Users/smi/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (22.3ms)
Somebody has a similar error? how did you resolve this?
The issue is here: https://github.com/rails/rails/issues/20624
To solve it, change in your Gemfile:
gem 'rack', '1.6.1'
I was getting the same thing, but with Rails 4.2.1, and running on Puma 2.11.3.
I noticed that Bundler just upgraded rack to 1.6.3. Setting the version back to 1.6.2 resolved it for me.

What is this error from?

I have absolutely no idea what I changed. The unicorn configuration has been static for months. And suddenly I start seeing this error - it seems related to something about workers but this is on dev and I have that part disabled in my app for dev. I'm totally stumped as to what happened - some update to unicorn?
EDIT: I should have been more clear. I KNOW it's a route problem. The trouble is, I do not know what is calling /inform. I am not calling this anywhere in my written code. Which means some gem is expecting there to be a resource at /inform, and it appears to be related to Unicorn. But I haven't changed anything to do with Unicorn in over 6 months. Which leads me to believe that some time I ran bundle install brought up a new version of the gem.
Try as I might, I haven't been able to identify what changed and where.
Started POST "/inform" for 192.168.1.9 at 2014-08-08 16:46:01 -0500
ActionController::RoutingError (No route matches [POST] "/inform"):
actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `block in call'
activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in `call'
railties (3.2.13) lib/rails/engine.rb:479:in `call'
railties (3.2.13) lib/rails/application.rb:223:in `call'
railties (3.2.13) lib/rails/railtie/configurable.rb:30:in `method_missing'
rack (1.4.5) lib/rack/lint.rb:48:in `_call'
rack (1.4.5) lib/rack/lint.rb:36:in `call'
rack (1.4.5) lib/rack/showexceptions.rb:24:in `call'
rack (1.4.5) lib/rack/commonlogger.rb:33:in `call'
rack (1.4.5) lib/rack/chunked.rb:43:in `call'
rack (1.4.5) lib/rack/content_length.rb:14:in `call'
unicorn (4.8.0) lib/unicorn/http_server.rb:571:in `process_client'
unicorn (4.8.0) lib/unicorn/http_server.rb:658:in `worker_loop'
unicorn (4.8.0) lib/unicorn/http_server.rb:520:in `spawn_missing_workers'
unicorn (4.8.0) lib/unicorn/http_server.rb:140:in `start'
unicorn (4.8.0) bin/unicorn:126:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p451/bin/unicorn:23:in `load'
/usr/local/rvm/gems/ruby-2.0.0-p451/bin/unicorn:23:in `<main>'
/usr/local/rvm/gems/ruby-2.0.0-p451/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.0.0-p451/bin/ruby_executable_hooks:15:in `<main>'
I added a fake route to stuff whatever came across into a collection:
Started POST "/inform" for 192.168.1.9 at 2014-08-14 20:48:45 -0500
Processing by ApiController#inform as HTML
WARNING: Can't verify CSRF token authenticity
MONGODB (0.5ms) creative_development['admins'].find({:_id=>nil}).limit(-1)
Redirected to http://192.168.x.x/login
Filter chain halted as :require_login rendered or redirected
Completed 302 Found in 1ms
192.168.1.9 - - [14/Aug/2014 20:48:45] "POST /inform HTTP/1.1" 302 - 0.0150
Of course it halted because whatever this is isn't part of my application and hasn't authenticated. Still no idea what's causing it.

Rails 4 - Kendo UI ImageBrowser successful upload but undefined thumbnail

I am integrating Kendo UI editor with my custom CMS in Rails 4. Everything seems to work except a bug after a new image is uploaded.
After I choose the image to upload the ImageBrowser adds a new item and displays the "upload in progress" circle. First it shows the image's file name near the circle, then it changes to undefined.
But if I close the ImageBrowser then open it again, the thumbnail is there as expected, without an error. If I artificially produce an error in the controller, at the end of the create action, then an error popup appears in the Kendo ImageBrowser (with 404 or 500), and if I wait a bit before clicking on the ok button then after clicking on it the thumbnail is there as expected also.
So I guess 2 things:
I am not providing the correct/expected response for the ImageBrowser at the end of the create action. (tried to render the same json as I render for transport.read but the problem still occurs). In this case my question is: What kind of response does Kendo ImageBrowser expect?
It takes time to upload/process/resize the image and kendo asks too soon (so it gets an "undefined" result), and won't "ask" again.
In this case my question is: How/when to delay or call read again to display the newly uploaded image's thumbnail correctly, without getting undefined back?
Any suggestions to fix this? Or is it an error on Kendo UI side?
Heres snippet from the output:
Started POST "/kezelo/assets" for 127.0.0.1 at 2014-01-17 18:09:33 +0100
Processing by Kezelo::AssetsController#create as */*
Parameters: {"file"=>#<ActionDispatch::Http::UploadedFile:0x007fa78bb00b00 #tempfile=#<Tempfile:/var/folders/90/wjyhxjfs3gz3xkhsk8z_sz2w0000gn/T/RackMultipart20140117-49102-5lwwh4>, #original_filename="100_3048.JPG", #content_type="image/jpeg", #headers="Content-Disposition: form-data; name=\"file\"; filename=\"100_3048.JPG\"\r\nContent-Type: image/jpeg\r\n">, "path"=>"", "authenticity_token"=>"sdKhe348x26hm0k8kirzHlYgmH1LN73wf3ZWyOA5PHY="}
(0.1ms) begin transaction
SQL (0.7ms) INSERT INTO "assets" ("created_at", "image_file_size", "kendo_type", "photo", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 17 Jan 2014 17:09:35 UTC +00:00], ["image_file_size", 247716], ["kendo_type", "f"], ["photo", "100_3048.JPG"], ["updated_at", Fri, 17 Jan 2014 17:09:35 UTC +00:00]]
(1.6ms) commit transaction
Asset Load (0.4ms) SELECT "assets".* FROM "assets"
Completed 200 OK in 1416ms (Views: 29.7ms | ActiveRecord: 2.7ms)
Started GET "/uploads/assets/undefined" for 127.0.0.1 at 2014-01-17 18:09:35 +0100
ActionController::RoutingError (No route matches [GET] "/uploads/assets/undefined"):
actionpack (4.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.2) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.2) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.2) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.2) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.0.2) lib/rails/engine.rb:511:in `call'
railties (4.0.2) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
Rendered /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.4ms)
Rendered /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb (4.4ms)
Rendered /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.4ms)
Rendered /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (47.9ms)
My transport read url is (with dataType: json):
http://localhost:3000/kezelo/assets
The json output for the above url:
[{"id":21,"name":"MAP_0528.JPG","type":"f","size":573896},{"id":22,"name":"MAP_0565.JPG","type":"f","size":646608},{"id":24,"name":"MAP_0667.JPG","type":"f","size":370408},{"id":26,"name":"mami_a_kertben.JPG","type":"f","size":364433},{"id":28,"name":"15kg_os.jpg","type":"f","size":975517},{"id":29,"name":"MAP_0257.jpg","type":"f","size":357723},{"id":31,"name":"DSC_0113.JPG","type":"f","size":574744},{"id":33,"name":"DSC_0062.JPG","type":"f","size":287631},{"id":34,"name":"100_2997.JPG","type":"f","size":126418},{"id":35,"name":"100_2999.JPG","type":"f","size":364433},{"id":36,"name":"100_3002.JPG","type":"f","size":340892},{"id":37,"name":"100_3025.JPG","type":"f","size":199709},{"id":38,"name":"100_3005.JPG","type":"f","size":435145},{"id":39,"name":"100_3019.JPG","type":"f","size":152869},{"id":40,"name":"100_3033.JPG","type":"f","size":208811},{"id":41,"name":"100_3039.JPG","type":"f","size":264420},{"id":42,"name":"100_3048.JPG","type":"f","size":247716}]
Problem solved. My first guess was right. I didn't provide the appropriate response for Kendo ImageBrowser.
It needed ONLY the uploaded image data in json format like this:
{"name":"new_image_name","type":"f","size":646608}
Now it works like a charm!
The most tricky thing of this integration was to provide a suitable json output for Kendo. For those who would like to use this editor in their apps, look into the acts_as_api gem. It will ease your pain.

How do I set up a rails production server using ruby on rails?

I started learning about ruby on rails and heroku and I have come to the problem of not being able to see the newly created app in heroku. I tried running the server locally by using the command:
rails server
The app showed on the browser successfully but when I type the command
rails server -e production
The browser displays an error saying "The page you were looking for doesn't exist...". This is the same error I get when I try accessing the app through heroku. I'm very new to heroku and ruby on rails so I'm not sure where to go from here.
The console shows this when I try the -e production option
ActionController::RoutingError (No route matches [GET] "/"):
actionpack (4.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.2) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.2) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.2) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.2) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.0.2) lib/rails/engine.rb:511:in `call'
railties (4.0.2) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
/home/adcalder7/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/home/adcalder7/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/home/adcalder7/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
The solution to this problem is to add an index to your root. Like this example shows: Link

.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in `initialize': No such file or directory - getaddrinfo (Errno::ENOENT)

I got this error when I tried to run: rake db:migrate, rake schema:load and rails s. The application I git cloned from Bitbucket is unusable and the client is unable to help.
I have reinstalled ruby and gemset and it didn't work. I have no idea how to fix this error. Please help. What is causing the error and where I can find information that might help me fixing it?
Errno::ENOENT
No such file or directory - getaddrinfo
Rails.root: /home/jacek/Programming/Rails/idea-academy
Application Trace | Framework Trace | Full Trace
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in `initialize'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in `open'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in `block in connect'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/timeout.rb:58:in `timeout'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/timeout.rb:89:in `timeout'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in `connect'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:626:in `start'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:1168:in `request'
newrelic_rpm (3.3.3) lib/new_relic/agent/instrumentation/net.rb:22:in `block in request_with_newrelic_trace'
newrelic_rpm (3.3.3) lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped'
newrelic_rpm (3.3.3) lib/new_relic/agent/instrumentation/net.rb:21:in `request_with_newrelic_trace'
copycopter_client (2.0.1) lib/copycopter_client/client.rb:49:in `block in download'
copycopter_client (2.0.1) lib/copycopter_client/client.rb:113:in `connect'
copycopter_client (2.0.1) lib/copycopter_client/client.rb:46:in `download'
copycopter_client (2.0.1) lib/copycopter_client/cache.rb:101:in `download'
copycopter_client (2.0.1) lib/copycopter_client/request_sync.rb:17:in `call'
newrelic_rpm (3.3.3) lib/new_relic/rack/browser_monitoring.rb:23:in `call'
newrelic_rpm (3.3.3) lib/new_relic/rack/developer_mode.rb:24:in `call'
sass (3.1.15) lib/sass/plugin/rack.rb:54:in `call'
warden (1.1.1) lib/warden/manager.rb:35:in `block in call'
warden (1.1.1) lib/warden/manager.rb:34:in `catch'
warden (1.1.1) lib/warden/manager.rb:34:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.3.3) lib/rack/etag.rb:23:in `call'
rack (1.3.3) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/head.rb:14:in `call'
remotipart (1.0.2) lib/remotipart/middleware.rb:30:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/flash.rb:243:in `call'
rack (1.3.3) lib/rack/session/abstract/id.rb:195:in `context'
rack (1.3.3) lib/rack/session/abstract/id.rb:190:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/cookies.rb:331:in `call'
activerecord (3.1.1) lib/active_record/query_cache.rb:62:in `call'
activerecord (3.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:477:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (3.1.1) lib/active_support/callbacks.rb:392:in `_run_call_callbacks'
activesupport (3.1.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
rails-dev-tweaks (0.6.1) lib/rails_dev_tweaks/granular_autoload/middleware.rb:34:in `call'
rack (1.3.3) lib/rack/sendfile.rb:101:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
railties (3.1.1) lib/rails/rack/logger.rb:13:in `call'
rack (1.3.3) lib/rack/methodoverride.rb:24:in `call'
rack (1.3.3) lib/rack/runtime.rb:17:in `call'
activesupport (3.1.1) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.3.3) lib/rack/lock.rb:15:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/static.rb:53:in `call'
railties (3.1.1) lib/rails/engine.rb:456:in `call'
railties (3.1.1) lib/rails/railtie/configurable.rb:30:in `method_missing'
rack (1.3.3) lib/rack/urlmap.rb:52:in `block in call'
rack (1.3.3) lib/rack/urlmap.rb:46:in `each'
rack (1.3.3) lib/rack/urlmap.rb:46:in `call'
railties (3.1.1) lib/rails/rack/content_length.rb:16:in `call'
railties (3.1.1) lib/rails/rack/log_tailer.rb:14:in `call'
rack (1.3.3) lib/rack/handler/webrick.rb:59:in `service'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
This is a very old thread but I think I've found what was wrong.
When you use net/http and try to instantiate a new object passing the URL string http = Net::HTTP.new("http://127.0.0.1:4567"), you'll get this error.
you have to instantiate using an URI object, just like:
uri = URI.parse("http://localhost:4567")
http = Net::HTTP.new(uri.host, uri.port)
Did you install all the gems it needs?
did you do bundle install?
gem install bundler
bundle

Resources