草庐IT

get_loaded_extensions

全部标签

ruby - kernel_require.rb :55:in `require' : cannot load such file error

我目前使用的是Ruby1.9.3版(尽管我在使用Ruby2.0.0时遇到了同样的问题)。在Windows764位上。我正在关注“TheCucumberBook”并卡在第7.2章-“使用转换删除重复项”。我的文件夹结构如下:\cash_withdrawal\cash_withdrawal\Gemfile\cash_withdrawal\Gemfile.lock\cash_withdrawal\features\cash_withdrawal\features\cash-withdrawal.feature\cash_withdrawal\features\step_definitions

ruby - 如何在具有通配符的 RSpec 中请求(GET/POST)路由

我在Rails中有这条(公认的丑陋的)路线:scope'/software'dopost'/:software_id/:attachment_id/event/*event'=>'software#post_event',as:'post_event'end(如果不是遗留API,我会更改它)我正在为它编写一个RSpec测试。rakeroutes给我:post_eventPOST/software/:software_id/:attachment_id/event/*event(.:format)api/version1301/software#post_event我的测试是这样的:de

ruby-on-rails - 为什么都是autoload,load_all!并要求全部用于 active_support.rb?

我正在查看active_support.rb以尝试了解它使用的加载过程。它使用三种加载方法:load_all!、autoload和require。为什么在同一个文件中使用三种不同的加载方式?moduleActiveSupportdefself.load_all![Dependencies,Deprecation,Gzip,MessageVerifier,Multibyte,SecureRandom,TimeWithZone]endautoload:BacktraceCleaner,'active_support/backtrace_cleaner'autoload:Base64,'ac

ruby-on-rails - Rails 控制台 : in `require' : cannot load such file -- readline (LoadError)

我的Rails应用程序出现一些错误,我正在尝试通过发出以下命令来启动Rails控制台:railsconsole无论我尝试什么,我总是得到同样的错误:/usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/irb/completion.rb:9:in`require':cannotloadsuchfile--readline(LoadError)from/usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/irb/completion.rb:9:in`'from/opt/mammie/web/icosole

ruby-on-rails - rails : Could not load database configuration. 没有这样的文件 -

我从GitHub存储库克隆了一个应用程序文件夹,在捆绑安装gems之后,我尝试使用rakedb:setup和rakedb:migrate命令,但都没有用,这是我的错误消息:**arun997@promanager:~/workspace(master)$rakedb:setuprequire'rails/all'...2.470sBundler.require...7.590srakeaborted!Cannotload`Rails.application.database_configuration`:Couldnotloaddatabaseconfiguration.Nosuchf

ruby-on-rails - minitest_plugin.rb :9 getting wrong number of arguments

~/Sites/sample_app$railstestRunningviaSpringpreloaderinprocess24338Runoptions:--seed58780Running:..Finishedin0.292172s,6.8453runs/s,6.8453assertions/s./var/lib/gems/2.3.0/gems/railties-5.1.0/lib/rails/test_unit/minitest_plugin.rb:9:in`aggregated_results':wrongnumberofarguments(given1,expected0)(

ruby-on-rails - `require' : cannot load such file -- capybara/rspec (LoadError)

我尝试测试我的项目。它以前是工作的,我不知道每当我输入bundleexecrspecspec/时我做了什么,它说cannotloadsuchfile--capybara/rspec(LoadError).我需要一个建议,作为新手,我需要一个建议来测试我在ruby​​onrails中的MVC。Gemfile:------------group:testdo#Prettyprintedtestoutputgem'turn',:require=>falsegem'minitest'gem'capybara','1.1.2'gem'rb-inotify','0.8.8'gem'libnotif

Ruby 需要 "no such file to load"错误但在路径中很明显

我一直在尝试让一个ruby​​文件要求另一个ruby​​文件,我觉得我快疯了。我的设置如下“/raid1/ruby-code/benchmark/”中的两个文件CommandRunnerBenchmarkerBenchmarker是此时的主要程序,它需要CommandRunner,我尝试了很多不同的东西,但都没有用。以下是我放在Benchmarker开头的所有内容的列表require'CommandRunner'require'./CommandRunner'$LOAD_PATH.unshiftFile.expand_path(File.dirname($PROGRAM_NAME))r

ruby - 我在 "gem list"中看到 gem 但有 "no such file to load"

我在Ubuntu10上sudoapt-getinstallruby1.9.1-full然后下载rubygem1.3.7的源码并安装sudorubysetup.rb然后,例如,安装sinatrasudogeminstallsinatra最后打开irb并输入require"rubygems"require"sinatra"得到错误LoadError:nosuchfiletoload--sinatrafrom(irb):2:in`require'from(irb):2from/usr/bin/irb:12:in`' 最佳答案 我正好遇到了

ruby - custom_require.rb :36:in `require' : no such file to load -- myapp(LoadError)

我收到上述错误,我所做的只是安装rvm并从您使用mac获得的默认ruby​​更新到ruby​​1.9.2。我所有的gem都出现在gem列表中,但我需要在某处指定路径吗?干杯,格伦诺。 最佳答案 检查你是否安装了gemsgemlist如果没有,照常安装geminstallwhatever或者如果你想要特定版本geminstallwhatever-v1.2.3或者如果你的项目中有bundler(即Rails),它只是bundleinstall如果您拥有所有的gem,那么这可能是一个本地文件,并且您可能来自Ruby版本$LOAD_PATH