webrick

Redmine-4.1.1 使用Thin作为Web服务器(Ubuntu 20.04.2)

↘锁芯ラ 提交于 2021-02-19 17:00:52
准备工作 按 Redmine 官方文档 Installation Guide 安装好了Redmine 4.1.1. 具体的环境见最后“ 环境信息 ” 使用webrick可以运行redmine: bundle exec rails server webrick -e production 安装thin $ sudo apt install thin $ thin -v thin 1.7.2 codename Bachmanity 配置 Redmine4.1.1 的gemfile # samxiao @ rm411 in ~/redmine-4.1.1 [12:16:42] $ vi Gemfile.local # samxiao @ rm411 in ~/redmine-4.1.1 [12:17:12] $ cat Gemfile.local gem 'thin' 运行thin作为web服务的Redmine # samxiao @ rm411 in ~/redmine-4.1.1 [12:19:41] C:127 $ bundle exec rails server thin -e production => Booting Thin => Rails 5.2.4.2 application starting in production on http://0.0.0.0:3000

Problems upgrading Rails 4.0.0 to 4.0.x (4.0.13) - private method `include' called for ActionDispatch::Assertions:Module (NoMethodError)

試著忘記壹切 提交于 2021-01-28 05:11:13
问题 I could not find a "direct" answer to this anywhere. Since I know there will be many other "Late Upgraders" to the party, I feel I need to get this out. I had a Rails 4.0.0 app running Ruby 2.0.0-p247. After upgrading to 4.0.13, I ran into this error: private method `include' called for ActionDispatch::Assertions:Module (NoMethodError) I received this through rspec and WEBrick. 回答1: I found a solution via another issue from layer-ruby: NoMethodError: private method `include' called for #

Ruby on Rails Server选项[关闭]

怎甘沉沦 提交于 2020-08-20 02:14:32
问题: The whole issue of setting up a development server for my Ruby on Rails application confuses me. 为我的Ruby on Rails应用程序设置开发服务器的整个问题使我感到困惑。 There are WEBrick, Mongrel, Passenger, Apache, Nginx and many more I am sure, and I don't really understand the different roles they play. 我敢肯定,有WEBrick,Mongrel,Passenger,Apache,Nginx等等,我真的不了解他们扮演的不同角色。 I started off using WEBrick, and now I use Mongrel for development. 我开始使用WEBrick,现在使用Mongrel进行开发。 Are these servers stand-alone, or do they sit in front of Apache? 这些服务器是独立的还是位于Apache的前面? I have read about Passenger and I don't really understand what it is

“Error bad URI” when trying to get WEBrick to accept HTTPS

久未见 提交于 2020-02-28 05:18:23
问题 So I've got a simple Sinatra site: # app.rb require 'sinatra' get '/' do 'Hello world!' end And I can set up rack to serve it over HTTP: # config.ru require './app' run Sinatra::Application # vim: ft=ruby And it works fine when I browse to http://localhost:9292 : % rackup [2013-01-22 10:27:52] INFO WEBrick 1.3.1 [2013-01-22 10:27:52] INFO ruby 1.9.2 (2011-02-18) [x86_64-darwin10.7.4] [2013-01-22 10:27:52] INFO WEBrick::HTTPServer#start: pid=7525 port=9292 127.0.0.1 - - [22/Jan/2013 10:28:05]

How to access html request parameters for a .rhtml page served by webrick?

孤街醉人 提交于 2020-01-22 15:20:08
问题 I'm using webrick (the built-in ruby webserver) to serve .rhtml files (html with ruby code embedded --like jsp). It works fine, but I can't figure out how to access parameters (e.g. http://localhost/mypage.rhtml?foo=bar) from within the ruby code in the .rhtml file. (Note that I'm not using the rails framework, only webrick + .rhtml files) Thanks 回答1: According to the source code of erbhandler it runs the rhtml files this way: Module.new.module_eval{ meta_vars = servlet_request.meta_vars

How do you run Rails with HTTPs locally for testing?

青春壹個敷衍的年華 提交于 2020-01-12 08:12:29
问题 Our dev envs use HTTP, prod uses HTTPS, this is causing issues that we can't reproduce locally with are HTTPS related. How can I run rails with SSL locally for testing purposes? Is there a Webrick config? Thanks 回答1: you should to use thin to do it: $ sudo apt-get install thin And add this line in config/application.rb config.force_ssl = true Then run app on thin with command line: $ thin start --ssl 回答2: I think the question here is specific to the Rails 'testing' environment, which might

WEBrick: RequestURITooLarge: should I update or use a different server?

风流意气都作罢 提交于 2020-01-09 11:11:46
问题 I currently have: $ rails s => Booting WEBrick => Rails 3.0.9 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2011-11-30 13:18:00] INFO WEBrick 1.3.1 [2011-11-30 13:18:00] INFO ruby 1.9.2 (2011-02-18) [x86_64-darwin10.8.0] [2011-11-30 13:18:00] INFO WEBrick::HTTPServer#start: pid=4204 port=3000 The problem I'm having is I'm using openID for auth and getting the following error: [2011-11-30 13:18:19] ERROR WEBrick::HTTPStatus:

Puma Error: Cannot assign requested address

房东的猫 提交于 2020-01-06 19:43:10
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> --------------------------------------------------------------------【可能出现的问题及解决】 Seems like you have 10.0.2.2 in your localhosts. You can check it in /etc/hosts . It may look like ... 127.0.0.1 localhost 10.0.2.2 localhost ... If you don't need 10.0.2.2 here and you don't know why you got it (your case =)) you can remove this line and try to run rails s again. Maybe you would have to restart your network system or you can reboot. Another way would be running rails server on particular host like rails s -b 127.0.0.1 I don't know exact reasons of the problem

Ruby on Rails Server选项[关闭]

故事扮演 提交于 2020-01-06 18:55:48
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 为我的Ruby on Rails应用程序设置开发服务器的整个问题使我感到困惑。 我敢肯定,有WEBrick,Mongrel,Passenger,Apache,Nginx等等,我真的不了解他们扮演的不同角色。 我开始使用WEBrick,现在使用Mongrel进行开发。 这些服务器是独立的还是位于Apache的前面? 我已经阅读了有关Passenger的文章,但我并不十分了解它的含义,该网站说“使Ruby Web应用程序的部署变得轻而易举”,它可以代替Mongrel吗? 就像Capistrano一样,它也部署Web应用程序吗? 请记住,我想测试SSL,并且我认为mongrel不支持SSL,最好的开发服务器设置是什么? 谢谢 #1楼 取决于上下文,“部署”一词可以有两种含义。 您还将混淆Apache / Nginx的角色与其他组件的角色。 历史注释:本文最初写于2010年11月6日,当时Ruby应用服务器生态系统受到限制。 我已于2013年3月15日使用生态系统中的所有最新更新更新了本文。 免责声明 :我是Phusion Passenger(应用程序服务器之一)的作者之一。 阿帕奇vs Nginx 它们都是Web服务器。 它们可以提供静态文件,但是-使用正确的模块-也可以提供动态Web应用程序

Change default server for Rails

有些话、适合烂在心里 提交于 2020-01-06 08:28:22
问题 I installed the mongrel gem because I need it on my workstation for rare occasions, and now it's my default Rails (2) server. I know I could specify script/server webrick on the command line, but the fact is that I'd like to have my system (or app) default to webrick, and only use mongrel when specified. Anybody know how to arrange that? Specs: WinXP, Rails 2.3.12, Ruby 1.8.7 回答1: Ok here are a few options: Option one - One off: Always add webrick as a command line arg Open script/server and