草庐IT

LOAD_DEFAULT

全部标签

ruby - "no such file to load -- net/https"- Heroku、 ruby 、Ubuntu 10.04

我在其他博客和stackoverflow线程中看到过这个问题,但似乎没有人知道答案。我正在尝试运行heroku并收到此错误:/usr/local/heroku/vendor/gems/rest-client-1.6.1/lib/restclient.rb:9:in`rescuein':nosuchfiletoload--net/https.Tryrunningapt-getinstalllibopenssl-ruby(LoadError)from/usr/local/heroku/vendor/gems/rest-client-1.6.1/lib/restclient.rb:5:in`

轨道上的 ruby 。调度.fcgi 。 dependencies.rb :251:in `require' : cannot load such file -- fcgi (LoadError)

app=redmine-2.0.1ruby=ruby​​1.9.3p194(2012-04-20修订版35410)[x86_64-linux][root@by1016690public]#./dispatch.fcgi/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in`blockinrequire':iconvwillbedeprecatedinthefuture,useString#encodeinstead./usr/local/lib/r

ruby-on-rails - 是否有全局设置 :default_strategy to :build for all factory_girl Factories? 的配置设置

我知道您可以像这样重写创建工厂对象的默认策略:Factory.define:person,:default_strategy=>:builddo#stuffendFactory.define:person,:default_strategy=>:createdo#stuffend#samebehaviorasthepreviousfactoryFactory.define:persondo#stuffend但我想知道我是否可以在factory_girl配置文件或/environments/test.rb文件中添加设置,以便Factory.define:persondo#stuffend

ruby-on-rails - AppFog 找不到名为 'default' 的 session 的配置

在我的mongoid.yml中有production:sessions:default:host:-port:database:username:password:当部署到AppFog时,我不断收到ActionView::Template::Error(Problem:Noconfigurationcouldbefoundforasessionnamed'default'.Summary:Whenattemptingtocreatethenewsession,Mongoidcouldnotfindasessionconfigurationforthename:'default'.Thi

ruby-on-rails - 在什么情况下会从父进程获取 Ruby $LOAD_PATH?

在我的Cucumber场景中,如果我在目标Rails应用程序文件夹中调用rakedb:schema:load,我会得到Cucumber进程的$LOAD_PATH而不是Rails应用程序自己的Gemfile/load路径。我觉得这很奇怪。结果是我得到以下错误:nosuchfiletoload--rails/all我无法在我的cucumber场景之外重现它。ruby-rubygems-e"system'rake-T'"正常工作->'rake-T'有应用程序自己的基于Gemfile的$LOAD_PATH;并且不会产生上述错误。谁能想到为什么子进程(rake-T或rakedb:schema:l

ruby-on-rails - App::Application.load_tasks 在哪里定义?

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。关闭7年前。Improvethisquestion#Addyourowntasksinfilesplacedinlib/tasksendingin.rake,#forexamplelib/tasks/capistrano.rake,andtheywillautomaticallybeavailabletoRake.requireFile.expand_path('../config/application',__FI

ruby - Travis-ci 构建失败,rake 中止!加载错误 : cannot load such file -- rspec/core/rake_task

我正在尝试将travis-ci添加到我的项目中,但它一直失败rakeaborted!LoadError:cannotloadsuchfile--rspec/core/rake_task我目前正在使用rspec3.1关于为什么会失败以及如何解决它有什么想法吗?这是我失败的项目:https://github.com/toymachiner62/readable_date_ranges/tree/tests编辑Usingworker:worker-linux-9-2.bb.travis-ci.org:travis-linux-4system_infoBuildsysteminformatio

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 中,如何制作 :mobile views to fallback default views when not found?

这个问题是我之前未回答的问题的后续问题:ActionView::MissingTemplate:Missingtemplate(Tryingtorendernonexistent:mobileformat)由于Rails方法似乎没有对此达成共识,有什么方法可以在从移动设备访问时呈现默认:html当:mobile格式不可用?(如果存在:mobileView,则应优先于非移动格式的View)。 最佳答案 假设您有一个mobile_request?Controller实例方法来检测移动请求,那么您应该能够设置格式回退链:#applicat