小编Che*_*kar的帖子

Ruby - 常量 DL 和 Fiddle 未定义

当我执行 rake db:create 显示错误 Constants DL and Fiddle is not Defined 时

我正在使用红宝石2.2.3。我认为我的 rjb 有问题

耙子中止!

常量 DL 和 Fiddle 未定义。/home/nibo/.rvm/gems/ruby-2.2.5/gems/rjb-loader-0.0.2/lib/rjb-loader.rb:62:in load' /home/nibo/.rvm/gems/ruby-2.2.5/gems/rjb-loader-0.0.2/lib/rjb-loader.rb:62:ininit'/home/nibo/.rvm/gems/ruby -2.2.5/gems/rjb-loader-0.0.2/lib/rjb-loader.rb:72:在block in <class:Railtie>' /home/nibo/.rvm/gems/ruby-2.2.5/gems/activesupport-4.2.10/lib/active_support/lazy_load_hooks.rb:36:in调用'/home/nibo/.rvm/gems/ruby-2.2.5/gems/activesupport-4.2。 10/lib/active_support/lazy_load_hooks.rb:36:execute_hook' /home/nibo/.rvm/gems/ruby-2.2.5/gems/activesupport-4.2.10/lib/active_support/lazy_load_hooks.rb:45:in在 run_load_hooks' /home/nibo/.rvm/gems/ruby-2.2.5/gems/activesupport-4.2.10/lib/active_support/lazy_load_hooks.rb:44 中的块中:在each' /home/nibo/.rvm/gems/ruby-2.2.5/gems/activesupport-4.2.10/lib/active_support/lazy_load_hooks.rb:44:inrun_load_hooks'/home/nibo/.rvm/gems/ruby-2.2.5/gems/railties-4.2.10/lib/rails/ block in <module:Finisher>' /home/nibo/.rvm/gems/ruby-2.2.5/gems/railties-4.2.10/lib/rails/initializable.rb:30:inapplication/finisher.rb:62:在instance_exec'/home/nibo/.rvm /gems/ruby-2.2.5/gems/railties-4.2.10/lib/rails/initializable.rb:30 run' /home/nibo/.rvm/gems/ruby-2.2.5/gems/railties-4.2.10/lib/rails/initializable.rb:55:in:在 run_initializers' /home/nibo/.rvm/gems/ruby-2.2.5/gems/ 中的块中Railties-4.2.10/lib/rails/initialized.rb:54:run_initializers' /home/nibo/.rvm/gems/ruby-2.2.5/gems/railties-4.2.10/lib/rails/application.rb:352:in初始化!' /home/nibo/rails_workplace/ekylibre/config/environment.rb:5:in <top (required)>' /home/nibo/.rvm/gems/ruby-2.2.5/gems/skylight-1.3.1/lib/skylight/probes.rb:81:inrequire'/home/nibo/.rvm/gems/ruby-2.2.5/gems/skylight-1.3.1/lib/skylight/probes。 rb:81:在require' /home/nibo/.rvm/gems/ruby-2.2.5/gems/polyglot-0.3.5/lib/polyglot.rb:65:in需要'/home/nibo/.rvm/gems/ruby-2.2.5/gems/activesupport-4.2.10/lib/active_support/dependency.rb:274:在block in require' /home/nibo/.rvm/gems/ruby-2.2.5/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:inload_dependency'/home/nibo/。 rvm/gems/ruby-2.2.5/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:在require' /home/nibo/.rvm/gems/ruby-2.2.5/gems/railties-4.2.10/lib/rails/application.rb:328:inrequire_environment 中!' /home/nibo/.rvm/gems/ruby-2.2.5/gems/railties-4.2.10/lib/rails/application.rb:457:in block in run_tasks_blocks' /home/nibo/rails_workplace/ekylibre/lib/tasks/db/tenanting.rake:19:in' …

ruby rubygems ruby-on-rails

5
推荐指数
1
解决办法
550
查看次数

从数组中获取最接近的数字值

我有一个数组:

["7", "8", "11", "13", "14"]
Run Code Online (Sandbox Code Playgroud)

我想要最接近的次等数(11如果有的话8),或者如果这样的数字不存在,那么最接近的优等数就是11(即13).

ruby

1
推荐指数
4
解决办法
3819
查看次数

标签 统计

ruby ×2

ruby-on-rails ×1

rubygems ×1