Ruby on Rails 3 and Webrick Issue

Problems with WEBrick crashing

Sorry, I don't know the answer to your question but I can offer a potential workaround you might be happy with: use Mongrel instead of WEBrick. Mongrel runs faster and is completely compatible. And maybe it won't crash when a route isn't found. Most Rails developers haven't used WEBrick in a few years.

To use Mongrel:

gem install mongrel

If Rails finds Mongrel it will use it automatically.

Hope that fixes it!

Start webrick in port 80 (mysql2 gem issue)

It seems that the mysql2 gem is not installed in the ruby run time that is used. however as this works for you without sudo, i suspect that you have rvm installed and you are using the rvm ruby (which has mysql installed) by default when lunching rails without sudo. but when you do sudo you are most probably using the system ruby which doesn't have mysql2 installed.

so in short if you have rvm installed and is using that. just use:

rvmsudo rails server -p 80

cannot load such file -- webrick/httputils

You have spring in your gemfile, usually hanging consoles and servers are related to that. The webrick gem was removed from the standard library in Ruby 3, so that's why it needs to be included in your Gemfile.

Add webrick to your Gemfile, do a bundle install, and then stop the background spring server with bin/spring stop. Then re-run the server.

Your best bet on solving issues with spring would be to head over and read about the gem on the GitHub project page, or opening a new question here on SO.

Issue when trying to run WEBrick and Rails

Okay so after further research I found my own answer

sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib

This did it for me. Just incase anyone else can't move past this problem with the original solutions.

Source: http://samuel.kadolph.com/2011/04/mysql2-gem-and-mac-os-x-image-not-found/

Unable to start the Webrick server with Ruby on Rails

Seems to be similar to this question

cannot load such file -- sqlite3/sqlite3_native (LoadError) on ruby on rails

Perhaps try the suggestions there and see if that helps?

Problem launching WEBrick in Rails

Install MySQL on your machine. You can get it here.

After that, you need to have:

gem 'mysql'

In your Gemfile.



Related Topics



Leave a reply



Submit