webrick

How to harden rails+webrick+https with insecure ciphers removed on Ruby 2.2

你。 提交于 2019-12-07 13:44:31
Updated: At first, my test code didn't adequately show ruby 2.4 sees the :SSLCiphers option whereas ruby 2.2 does not. I have edited the example code below to make that clear. Updated: Since my question failed to elicit any help from the community, I forged on ahead and two days later found the solution, which I have included below. I have a small Rails 3 application on Ruby 2.2 and Webrick that handles small loads and therefore does not need the complexity of a "real" web server. It has been patched to support https connections for secure logins, but by default, it accepts many old weak

Why won't my css changes show without me restarting WEBrick?

空扰寡人 提交于 2019-12-07 13:00:55
问题 I am doing some simple css edits on a rails 3.2 project and my changes will not show up unless I restart webrick. I came across something saying that it may be using the public/assets directory, but I don't think this is the case because my changes show when the server is restarted. Not sure why this is happening. Does anyone know if there is some sort of configuration that I need to fix to solve this problem? 回答1: bundle exec rake assets:clean run this command 回答2: I added this to my

Configuring Webrick in rails 3.0 to serve both http and https (SSL)

我只是一个虾纸丫 提交于 2019-12-07 08:39:13
问题 I am trying to use ssl_requiremnt plugin for rails 3.0 in my app. A few links in my app need to be secure with SSL and the rest need to be served by http only. I configured webrick according to this post: http://www.nearinfinity.com/blogs/chris_rohr/configuring_webrick_to_use_ssl.html Now I want webrick to serve both http and https. It seems it was easy with rails 2.3. Could someone please help me? 回答1: I solved the issue by switching Nginx but could not do it using Webrick. I guess Webrick

Using WEBrick to serve PHP web applications

会有一股神秘感。 提交于 2019-12-07 06:07:14
问题 I am a PHP developer who has started learning Ruby on Rails. I love how easy it is to get up and running developing Rails applications. One of the things I love most is WEBrick. It makes it so you don't have to configure Apache and Virtual Hosts for every little project you are working on. WEBrick allows you to easily start up and shut down a server so you can click around your web application. I don't always have the luxury of working on a Ruby on Rails app, so I was wondering how I might

WEBrick fails to start default rails app: “uninitialized constant ActiveRecord::ConnectionAdapters::Column::Format”

依然范特西╮ 提交于 2019-12-06 22:25:18
I'm trying to begin Ruby on Rails development on a Windows machine, but I can't get WEBrick to start the default Rails app. Here's the output from my attempt to create and start the app: C:\Users\my_user>ruby -v ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32] C:\Users\my_user\Desktop\wkspc>rails new sample_app [...] Bundle complete! 11 Gemfile dependencies, 57 gems now installed. Use `bundle show [gemname]` to see where a bundled gem is installed. C:\Users\my_user\Desktop\wkspc>cd sample_app C:\Users\my_user\Desktop\wkspc\sample_app>rails server DEPRECATION WARNING: alias_method

Server won't start on using authlogic-oauth2

纵然是瞬间 提交于 2019-12-06 11:24:53
问题 I have included oauth2 and authlogic-oauth2 in the gemfile as I want to use them and am trying to start the server. It doesn't start and gives me the error: /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails.rb:44:in `configuration': undefined method `config' for nil:NilClass (NoMethodError) from /Library/Ruby/Gems/1.8/gems/authlogic_oauth2-1.1.2/lib/authlogic_oauth2.rb:14 from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' from /Library/Ruby/Gems/1.8/gems

Ruby on Rails: How to start the WEBrick server automatically on Windows in background?

房东的猫 提交于 2019-12-06 10:51:21
In order to run the my Rails application on Windows XP I open a command line, cd to application's directory, and then run rails server . I would like to automate this, such that every time I turn on my computer, all I'll have to do is to type localhost:3000 in a browser. How could I do this ? The simpler way is to create a batch file with the instruction what you give in the command prompt like d: cd projects\myapp ruby script\server and then drop a copy of the file to Windows Start -> All Programs -> start up folder. You have few possibilities to do that. using the registry you can use HKLM

Why RubyMine 2.0.2 starts Webrick on different port each time I run/debug my app?

早过忘川 提交于 2019-12-05 18:45:41
Each time I start my Rails 2.3.8 webapp under RubyMine, it's using a different port. This drives me mad, since I've to change the URL in the browser each time I want to test something. I'm unable to find any configuration option to change that. Anyone? This may not help because I'm using RubyMine 3, however, there is a dropdown menu in my toolbar for selecting the different development environments (e.g. production, development). The dropdown menu is to the left of the green "Run" triangle. If you click on the list one of the options is "Edit Configurations" - this pops open a window that has

Why won't my css changes show without me restarting WEBrick?

孤街浪徒 提交于 2019-12-05 18:39:07
I am doing some simple css edits on a rails 3.2 project and my changes will not show up unless I restart webrick. I came across something saying that it may be using the public/assets directory, but I don't think this is the case because my changes show when the server is restarted. Not sure why this is happening. Does anyone know if there is some sort of configuration that I need to fix to solve this problem? bundle exec rake assets:clean run this command I added this to my development.rb file and now it works. config.assets.digest = false 来源: https://stackoverflow.com/questions/14559615/why

Using WEBrick to serve PHP web applications

巧了我就是萌 提交于 2019-12-05 09:50:47
I am a PHP developer who has started learning Ruby on Rails. I love how easy it is to get up and running developing Rails applications. One of the things I love most is WEBrick. It makes it so you don't have to configure Apache and Virtual Hosts for every little project you are working on. WEBrick allows you to easily start up and shut down a server so you can click around your web application. I don't always have the luxury of working on a Ruby on Rails app, so I was wondering how I might configure (or modify) WEBrick to be able to use it to serve up my PHP projects and Zend Framework