I installed rails recently and I have been having quite a bit of trouble just trying to install everything, but it is finally done and now when I try to launch a rails server I always get an error and the server ends up stoping at that exact moment.
Here is what it says:
NoMethodError `new_with_config' for
ActionDispatch::Routing::RouteSet:Class.
I am using Rails version 5.0.0.1
Related
I have a ROR application I'm trying to stand up locally on a windows machine. Since it requires passenger I am using WSL2 to run Ubuntu. I've installed ruby (2.6.5) and made sure rails in installed (4.2.11.3). I've run bundle install successfully, but every time I try to run a command such as rails server, rake, ect. I get an error saying uninitialized constant ActiveSupport::CurrentAttributes. From googling, there isn't really one answer for this. I've tried removing and re-installing rails. Removed railties as well, but the error keeps happening. My suspicion is that it has something to do with me running on WSL2, but I am not sure.
I'm new to Ruby on Rails, and am trying to set up a basic, local web server in order to dive into all the framework has to offer. I've installed rails using
gem install rails
and have everything seeming to work. However, I also downloaded rails 5.0.0.rc1. When I call to boot up the server with
rails s
or
bin/rails server
it just ends up with a blank screen on http://localhost:3000. Does this have anything to do with the installation of rails 5.0.0.rc1? Why am I just getting a blank screen and not the default information page which signals that it is working?
I got an error while running ruby script/server,
DRb::DRbConnError in HomeController#index
druby://localhost:3333 - #
Iam not able to understand where is the exact error, is there any gem missing or server issue.
I don't know what the ruby app you are trying to start is supposed to do but it seems to use a DRB server, which you would have to start before.
I've get an action in my Rails 3 app that I'm pw-protecting with authenticate_or_request_with_http_basic. Working fine on my development machine but it's not prompting for the http_basic user/password on the production server.
The entire production app runs over https/SSL on nginx.
Where do I look to resolve this? Does http basic auth not work over SSL? Or is there an nginx setting I need to look at?
TIA
Not sure if this related to Rails 3.
I just recently had problems running Mongrel 1.1.5 and Rails 2.3.8
Apparently, there is a bug in this set up where our production machine does not prompt for the user name and password (but works locally, because we are using web-brick).
In the mongrel.log we keep getting this error:
Error calling Dispatcher.dispatch #split' called for nil
:NilClass>
/usr/local/rvm/gems/ruby-1.8.7-p174/gems/actionpack-2.3.8/lib/action_controller/cgi_process.rb:52:indispatch_cgi'
/usr/local/rvm/gems/ruby-1.8.7-p174/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:101:in `dispatch_cgi'
...
Found the monkey patch needed to fix this Mongrel 1.1.5 and Rails 2.3.8 and it worked for me.
The german site that lead to the solution: http://railssprech.de/ with 2 links for 2.3.8 and 2.3.9.
Here is the 2.3.8 version: http://www.pcoder.net/error-calling-dispatcher-dispatch/#axzz1RknBQso2
The patch explains why this error was occurring. Check the Rails 3 CGIHandler.dispatch_cgi method and see if it the same bug. You may need to extract the Rails 3 out and monkey patch it.
Hope this helps.
BTW: Mongrel 1.1.5 and Rails 2.3.5 works!
I'm following the Getting Started with Rails guide but ran into an issue opening http://localhost:3000
Shell output:
[2010-03-23 19:19:14] ERROR NameError: uninitialized constant ActiveResource::Base
Error in the browser:
Internal Server Error
uninitialized constant ActiveResource::Base
WEBrick/1.3.1 (Ruby/1.8.7/2009-06-12) at localhost:3000
I followed the directions exactly as they were specified in the guide:
Ran rails generate controller home index
I removed index.html
Added root :to => "home#index" to config/routes.rb
I checked app/views/home/index.html.erb and it is indeed there.
I then used rails server to launch the server. At first attempt the browser loads a blank page, but afterwards starts showing the browser error above.
Why is it that Rails can't locate the index.html.erb file? Or is the error something different?
-
Running Rails 3.0beta with Ruby 1.8.7
uninitialized
constant ActiveResource::Base
It looks like there's a problem with your Ruby/Rails setup.
Do you have more than one version of Ruby on your system? It could be that the version of Ruby you're using to run your app is looking for the Rails gems (ActiveResource::Base) in the wrong repository.
If you're using the Getting Started guide I recommend that you don't use Rails 3.0 beta, as, well, it's a beta release. It's best to use the stable-of-the-moment 2.3.5.
I have this error as well. I am running Ruby 1.8.7 p249 under RVM - Rails 3 beta3 on Ubuntu (Lucid Lynx). The strange thing is I have the exact same setup (RVM, Ruby version & gems) on my Mac and it works fine.
UPDATE: I tried again using RVM to switch to Ruby-1.9.2-HEAD and everything is working as expected. Still doesn't solve problem but it get Rails 3 working at least.