草庐IT

language-server-protocol

全部标签

ruby-on-rails - rails : uninitialized constant just happen on production server

我有一个放在lib/network中的类:moduleNetworkApiclassNetworkProxyendend然后在另一个类中,我引用了这个类:network_proxy=::NetworkApi::NetworkProxy.new(params)一切都在我的开发环境中正常运行,但是当我部署到服务器时,我在上面一行收到错误消息:NameError:uninitializedconstantNetworkApi::NetworkProxy我不知道为什么会出现这个奇怪的错误。请告诉我为什么。 最佳答案 请注意Rails5dis

ruby - HTTP POST 上的 SSL 错误(未知协议(protocol))

尝试通过SSL连接到ImgurAPI时出现错误。这是代码和错误:API_URI=URI.parse('https://api.imgur.com')API_PUBLIC_KEY='Client-ID--'ENDPOINTS={:image=>'/3/image',:gallery=>'/3/gallery'}#Public:Uploadanimage##args-Theimagepathfortheimagetoupload#defupload(image_path)http=Net::HTTP.new(API_URI.host)http.use_ssl=truehttp.verify

ruby - 是否有 chrome 开关来抑制 'external protocol request' ?

是否有chrome开关来抑制“外部协议(protocol)请求”?我正在使用selenium-ruby​​-watirwebdriver自动化应用程序。我在网上搜索了绕过此窗口和对话的解决方案:http://productforums.google.com/forum/#!topic/chrome/K22hXwRy6zQ概述了我们如何手动执行此操作。但是对于Selenium-Chrome-Ruby,我需要通过可能设置一个chrome开关(chorme开关列表:=http://src.chromium.org/svn/trunk/src/chrome/common/chrome_swit

ruby-on-rails - Rails 和 MQTT : Subscribe to topic in background at server startup?

我想在服务器启动时在我的Rails应用程序中订阅一个mqtt主题,并保持订阅始终处于事件状态和运行状态。我正在使用这个mqttgem进行mqtt通信:https://github.com/njh/ruby-mqtt这是我现在拥有的:在application.rb中:config.after_initializedomqttSub=BackgroundMQTT.newmqttSub.runend后台MQTT类:classMQTTSubscriberdefrunThread.newdoMQTT::Client.connect(:host=>'localhost',:port=>1883,)

ruby - Thin::Server#daemonize 立即退出

我试图制作一个可执行文件,它通过Thin作为守护进程启动Sinatra应用程序。我正在使用此代码通过Sinatra应用程序调用Thin:#!/usr/bin/envrubyrequire'thin'require'app.rb'server=::Thin::Server.new('127.0.0.1',9999,App)server.log_file='tmp/thin.log'server.pid_file='tmp/thin.pid'server.daemonize这是我执行脚本时得到的日志输出:>>WritingPIDtotmp/thin.pid>>Exiting!服务器正常启动

ruby - 轨道 4 log4r server.rb :78:in `start' : undefined method `formatter'

我已经研究这个话题太久了,所以我必须发布这个。我有几个运行此设置的应用程序,其中一个在rails启动(railss)时完全失败。它们的配置几乎完全相同,但我似乎无法在这里大海捞针。有没有人对如何找到这个问题有任何指示?设置基于:http://blog.mmlac.com/log4r-for-rails/comment-page-1/#comment-1731当我尝试运行railss时:=>BootingWEBrick=>Rails4.0.0applicationstartingindevelopmentonhttp://0.0.0.0:3000=>Run`railsserver-h`f

ruby-on-rails - Rails 中的推杆 : "Unknown auth_key" - server side not triggering events

我正在尝试将Pusher插入到我已经很晚的Rails应用程序中。客户端工作正常-使用PusherEventCreator触发所需的javascript。但是服务器端不工作:在我的通知Controller中使用以下代码创建要测试的操作:Pusher.trigger('private-4','new_message',{:from=>"christian",:subject=>"hello"})给出这个错误:Pusher::AuthenticationError(Unknownauth_key):app/controllers/notifications_controller.rb:57:

ruby-on-rails - rbenv : bundle: command not found on production server

我正在尝试部署Rails应用程序,但遇到错误DEBUG[1a70ba92]Command:cd/home/deploy/myapp/releases/20140615090226&&(PATH=$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATHRBENV_ROOT=~/.rbenvRBENV_VERSION=2.1.2~/.rbenv/bin/rbenvexecbundleinstall--binstubs/home/deploy/myapp/shared/bin--path/home/deploy/myapp/shared/bundle--withou

nginx配置https后报错nginx: [emerg] https protocol requires SSL support in XXX.conf详细解决方法

一、前言最近,在测试环境的nginx里增加了一个https配置:location/api-meeting-qq/{proxy_passhttps://api.meeting.qq.com/;}然后,执行命令://这个是nginx启动文件的路径,根据实际情况自行更改sudo/home/useradmin/nginx/sbin/nginx-sreload结果,nginx就报错了:nginx:[emerg]httpsprotocolrequiresSSLsupportin/home/useradmin/nginx/conf.d/trainNginx.conf:9二、解决方法百度发现,是之前安装ngi

ruby-on-rails - 当我停止 rails server 时,我的 elasticsearch 索引会发生什么?

我对在Rails应用程序中使用Elasticsearch还很陌生,我正在使用耐嚼的gem来实现它。当我通过railss在开发模式下运行我的Rails应用程序时,我然后通过elasticsearch命令运行Elasticsearch并运行rakechewy:reset:all为我的数据创建索引。这样做一切正常,但如果我重新启动服务器,我必须再次运行rakechewy:reset:all命令以重建索引,否则我会收到错误消息。当我重新启动服务器时,索引会发生什么变化?服务器停止时是否销毁?我不是很熟悉Elasticsearch的功能,所以希望有人能对幕后发生的事情有所了解。