草庐IT

postcss-load-config

全部标签

ruby - Rack : cannot load such file 'sinatra'

我已经在irb中安装了sinatragem,如果我输入,require'sinatra'它返回true。但是当我这样做的时候rackup-dconfig.ru它告诉我nilException`LoadError'at/usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36-cannotloadsuchfile--sinatra这是我的config.rurequire'./app'set:environment,ENV['RACK_ENV'].to_symset:app_file,'app.rb'disable:runrunSinat

ruby - 如何解决 LoadError : cannot load such file -- ffi_c

我想知道如何解决在安装Ruby2.2.1Windows安装程序和Rubygem2.4后在控制台上执行require命令时看到的下一个错误.6。LoadError:cannotloadsuchfile--ffi_cfromC:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in`require'这是类似于DLL的东西吗? 最佳答案 如果您阅读requirementffi的文档,你可以看到:Youneedasanebuildingen

ruby-on-rails - rails config/environments 'config' 在哪里定义?

在config/environments/production.rb(和其他环境)中有:config.eager_load=true和一大堆其他config.foobar调用。但是“配置”从何而来?通常你有这样的东西:SomeClass.eachdo|block_variable|block_variable.some_methodend但对于神秘的“配置”,情况并非如此,它就像一个未在任何地方声明的block变量。打开Rails控制台,当我这样做时:irb(main):001:0>configNameError:undefinedlocalvariableormethod`confi

ruby - Heroku 上没有这样的文件 'config/database.yml'

我的应用是一个RubyRack应用。当我的Heroku应用程序启动时它中断了,因为/app/config.ru:8:in`read':Nosuchfileordirectory-config/database.yml(Errno::ENOENT)为什么会这样?我知道Heroku是为了创建这个文件https://devcenter.heroku.com/articles/cedar-migrationThedatabasecredentialswillstillbeconfiguredautomatically:atslugcompiletime,aconfig/database.yml

ruby-on-rails - 如何跳过 config.middleware.use 用于 Rails 5 中的特定 Controller 操作

有没有办法设置config.middleware.use来排除/忽略/跳过特定的Controller操作?例如,如果我想排除Post#showController操作。我正在使用https://github.com/railslove/rack-tracker测试GoogleAnalytics/标签管理器。#RackTrackerconfigconfig.middleware.use(Rack::Tracker)dohandler:google_tag_manager,{container:ENV['GTM_CONTAINER_ID']}end我想我可以使用这样的条件:#RackTra

ruby - gem_original_require' : no such file to load -- sinatra (LoadError)

我正在我的本地机器上工作。如果我使用Sinatra应用程序,将此行添加到myapp.rb没有问题require'sinatra'当我转到控制台并运行时irb-rmyapp.rb我收到这个错误gem_original_require':nosuchfiletoload--sinatra(LoadError)我知道我的IRB或Ruby路径看起来不正确。我正在使用(简单的Ruby版本管理:rbenv)来管理Ruby环境,不太确定这是否会影响事情?我运行了gemenv并得到了这个。RubyGemsEnvironment:-RUBYGEMSVERSION:1.8.10-RUBYVERSION:1

ruby - Jekyll 构建失败 : Liquid Exception: cannot load such file -- yajl

最近刚刚弄坏了我的PC,我已经有一段时间没有使用Jekyll,甚至Ruby,但是在我认为我已经正确设置了所有内容之后,当我尝试运行时......jekyllbuildorjekyllserve我收到这个错误:Generating...LiquidException:cannotloadsuchfile--yajl/2.0/yajlin_posts/2013-09-21-welcome-to-jekyll.markdownC:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in`require':cannotl

javascript - rails link_to :remote from within ajax-loaded content

大家好,我正在开发一个应用程序,但我在使用新的Rails3link_to时遇到了困难。情况是这样的——我的“主页”页面上有两个div,每个div都在document.load中填充了ajax。这按预期工作。在我加载到这些div的页面内容中,我想使用link_to...:remote=>true功能。源代码使用data-remote="true"标记按预期呈现,但是当我单击链接时,它们被完全忽略(该链接被视为常规超链接)。我已经编写了可以正确处理所有内容的.rjs文件(因为它们在硬编码时可以工作),所以这不是问题所在。这是加载了ajax的内容的html源代码:LinkALinkB当正常情

ruby-on-rails - Rails 4.1 - LoadError : cannot load such file -- active_support/core_ext/string/encoding

我今天要更新到Rails4.1。我运行了bundleupdaterails,一切似乎都更新得很好。但是,当我现在尝试运行任何rake任务时,我收到以下错误:$rake--tracerakeaborted!LoadError:cannotloadsuchfile--active_support/core_ext/string/encoding/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in`require'/Us

ruby-on-rails - 加载错误 : cannot load such file — bcrypt_ext

我已尝试在我的Rails应用程序上部署设计身份验证。我遇到了这个问题“无法加载这样的文件——bcrypt_ext”我发现这是基于Windows的计算机中的一个常见问题,但其他问题的答案还没有帮助我。我正在运行带有x86ruby​​和devkit的Windows8x64 最佳答案 尝试C:\>geminstall--no-ri--no-rdocbcryptC:\>cd(pathtogemsroot)\bcrypt-3.1.7-x86-mingw32\ext\mriC:\(pathtogemsroot)\bcrypt-3.1.7-x86