草庐IT

ruby - Jekyll - 液体异常 : cannot load such file -- yajl/2. 0/yajl

我试图让Jekyll在Windows上工作,但没有成功。这是我第一次安装/使用Ruby。Ruby版本:ruby2.0.0p0(2013-02-24)[i386-mingw32](http://rubyinstaller.org/)杰基尔版本:杰基尔1.0.1当我在_config.yml中将pygments设置为false时,错误消失了。错误信息D:\Code\Jekyll\test>jekyllserveConfigurationfile:D:/Code/Jekyll/test/_config.ymlSource:D:/Code/Jekyll/testDestination:D:/Co

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 - 无法运行 RSpec(未初始化的常量用户(NameError)

尝试运行bundleexecrspecspec/models/user_spec.rb但未能执行(请参阅下面的错误)。user_spec.rb的内容:require'rails_helper'describeUserdopending"addsomeexamplesto(ordelete)#{__FILE__}"end如果我删除最后3行,那么它将完成0个示例和0个失败。但是,当存在最后​​3行时,它会产生错误/spec/models/user_spec.rb:4:in`':uninitializedconstantUser(NameError)from/var/lib/gems/1.9

ruby-on-rails - 让 nokogiri 使用更新版本的 libxml2

我一直在尝试在我的计算机(MountainLion)上安装Nokogiri以与rspec和capybara一起使用,但对于我来说,我无法让它正常运行。据我所知,问题在于nokogiri使用了错误版本的libxml2。到目前为止,我已经尝试使用Homebrew卸载和重新安装libxml2(确保它是最新的),使用bundle卸载和重新安装nokogiri,并指定Homebrew在安装nokogirigem时安装的libxml2文件的确切路径。我最近的安装说明是这样的sudogeminstallnokogiri----with-xml2-include=/usr/local/Cellar/l

ruby-on-rails - 如何修复 `new' :String 的未定义方法 "Rack::Cors"

我是RubyonRails的新手,正在学习如何使用Angular,但是在我运行“geminstallrack-cors”之后,当我尝试启动Rails应用程序时,我保持收到此错误:C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.1.1/lib/action_dispatch/middleware/stack.rb:35:in`build':undefinedmethod`new'for"Rack::Cors":String(NoMethodError)Didyoumean?nextfromC:/Ruby23-x64/lib/ruby

ruby - 使用 ruby​​ 应用程序时出现 remove_entry_secure 错误

我正在尝试使用docsplit将PDF文件拆分为图像。但看来我的ruby​​安装有问题。我每次都会收到以下错误:/usr/lib/ruby/1.8/fileutils.rb:694:in`remove_entry_secure':parentdirectoryisworldwritable这是完整的命令行输出:$docsplitimagespdf-test.pdf/usr/lib/ruby/1.8/fileutils.rb:694:in`remove_entry_secure':parentdirectoryisworldwritable,FileUtils#remove_entry_

ruby-on-rails - 未初始化的常量 ActiveSupport::Dependencies::Mutex

我尝试运行一个从OSX到Debian的工作Rails项目。我在两个系统上都使用RVM并为项目创建了相同的gemsets和rvmrc。在Debian上,我只安装了带有rvm的ruby​​,不存在ruby​​的系统安装。当我进入项目文件夹时,rvm正在切换到版本1.8.7并正在使用项目gemset,一切看起来都很好。但是当我启动rake-T时,我得到了这个错误:$rake-T--trace(in/home/i/project/src)rakeaborted!uninitializedconstantActiveSupport::Dependencies::Mutex/home/i/.rvm

ruby-on-rails - 捆绑控制台因未初始化常量 Rails 而失败

我已经使用railspluginnewFoobar--full--mountable命令创建了一个新的Rails引擎。运行bundleconsole时,我得到uninitializedconstantRails这是为什么?Resolvingdependencies...Unfortunately,afatalerrorhasoccurred.PleaseseetheBundlertroubleshootingdocumentationathttp://bit.ly/bundler-issues.Thanks!/Users/kyledecot/Desktop/Foobar/lib/foo

ruby-on-rails - 无法使用 Assets :precompile 在 rails rake 上复制 NilClass

当我尝试预编译我的Assets时,出现以下错误。这是具有完整输出的跟踪:RAILS_ENV=productionbundleexecrakeassets:precompile--trace**Invokeassets:precompile(first_time)**Invokeassets:environment(first_time)**Executeassets:environment**Invokeenvironment(first_time)**Executeenvironmentrakeaborted!TypeError:can'tdupNilClass/var/lib/ge

ruby-on-rails - Rake Assets 在开发或测试组中没有 Gems 预编译

好的,所以我在构建我的Docker镜像时遇到了一个错误(将其视为类似于部署步骤,如果您不熟悉Docker,则可以将其视为Heroku部署)。当预编译步骤发生时,正在寻找:test和:development组中的Gem,因为我已经捆绑了--without开发测试-因为我不想让QT只是为了capybara-webkit不会在bundle上出错-预编译步骤会引发错误。错误总是以下的变体:Couldnotfindinanyofthesources(Bundler::GemNotFound)我的gem文件:source'https://rubygems.org'#BundleedgeRailsi