Re: rails constantly failing with http 406 error
Hassan Schroeder <[email protected]> Sun, 28 Jul 2019 10:50:35 -0700
| Newsgroups | gmane.comp.lang.ruby.general |
|---|---|
| Message-ID | <CACmC4yBHfvaeQLjTUZcsQ4LTiQAwYTW4JCbnnsn0UX9QF4ALtw@mail.gmail.com> |
On Sat, Jul 27, 2019 at 2:07 PM Barry Kimelman <[email protected]> wrote: > > I was just following the simple steps in a rails beginner tutorial to > create a basic "blog" application. I changed to the directory where I > wanted the application structure to be created and issued the command > "rails new blog". After that succeeded I changed the current directory to > "blog". As stated in the tutorial I issued the command "ruby bin\rails > server". I waited for the messages from the server yo be displayed which > indicated the server was ready to accept requests. I then went into my > browser and entered the URL http://localhost:3000. After a very short > time the server displayed an error message and a traceback. > > C:\barry\ruby\environment\blog>ruby bin\rails server > => Booting Puma > => Rails 5.2.3 application starting in development > => Run `rails server -h` for more startup options > *** SIGUSR2 not implemented, signal based restart unavailable! > *** SIGUSR1 not implemented, signal based restart unavailable! > *** SIGHUP not implemented, signal based logs reopening unavailable! > Puma starting in single mode... > * Version 3.12.1 (ruby 2.6.0-p0), codename: Llamas in Pajamas > * Min threads: 5, max threads: 5 > * Environment: development > * Listening on tcp://localhost:3000 > Use Ctrl-C to stop > C:/Ruby/lib/ruby/gems/2.6.0/gems/activemodel-5.2.3/lib/active_model/validations/clusivity.rb:8: > warning: already initialized > constant ActiveModel::Validations::Clusivity::ERROR_MESSAGE > C:/ruby/lib/ruby/gems/2.6.0/gems/activemodel-5.2.3/lib/active_model/validations/clusivity.rb:8: > warning: previous definition > of ERROR_MESSAGE was here > Started GET "/" for ::1 at 2019-07-27 14:02:12 -0600 > Processing by Rails::WelcomeController#index as HTML > Completed 406 Not Acceptable in 708ms (ActiveRecord: 0.0ms) > You've gotten a bunch of responses here that seem to ignore that you're describing an out-of-the-box unmodified installation of Rails. Here's what I get duplicating your install: 10:39 ~/testcases/rails/rails-5-2/blog:(master) [ex:1.9.1 Erlang/OTP 22]$ bundle exec ruby bin/rails server => Booting Puma => Rails 5.2.3 application starting in development => Run `rails server -h` for more startup options Puma starting in single mode... * Version 3.12.1 (ruby 2.6.0-p0), codename: Llamas in Pajamas * Min threads: 5, max threads: 5 * Environment: development * Listening on tcp://localhost:3000 Use Ctrl-C to stop Started GET "/" for ::1 at 2019-07-28 10:40:31 -0700 Processing by Rails::WelcomeController#index as HTML Rendering /Users/hassan/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb Rendered /Users/hassan/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb (4.6ms) Completed 200 OK in 24ms (Views: 13.0ms | ActiveRecord: 0.0ms) The differences I see are 1) I'm not on Windows, and 2) those odd warnings about redefinition of constants. How did you install Ruby? And would you be up for trying this on a Linux installation (VM, Docker, AWS, whatever)? -- Hassan Schroeder ------------------------ [email protected] twitter: @hassan Consulting Availability : Silicon Valley or remote Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>