[英]Ruby Script API That Requires a gem
I have spent almost 8 hours on this and I know it's an easy fix. 我已经花了将近8个小时的时间,而且我知道这很容易解决。
I want to use this repository of the basecrm gem. 我想使用basecrm gem的此存储库 。
The problem: I don't know how to require/include the gem, neither locally as a cloned copy or as a regular "require gem_name" to find Leads 问题:我不知道如何要求/包括宝石,无论是在本地作为克隆副本还是作为常规的“要求gem_name”来查找潜在客户
gem 'basecrm', :git => 'git://github.com/basecrm/basecrm.git'
According to the Readme.md it says to call 根据Readme.md,它说要打电话
require 'basecrm'
⌘ ~/Sites/basecrm/ irb irb(main):001:0 require 'basecrm' LoadError: cannot load such file -- basecrm from /Users/username/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /Users/username/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require' from (irb):1 from /Users/username/.rbenv/versions/2.1.3/bin/irb:11:in `<main>' irb(main):002:0session = BaseCrm::Session.new NameError: uninitialized constant BaseCrm from (irb):2 from /Users/username/.rbenv/versions/2.1.3/bin/irb:11:in `<main>'
Any help is really appreciated. 任何帮助都非常感谢。 I am ready to tear my hair out on this.
我准备为此扯掉头发。
如果您使用Gemfile,则应使用bundler运行irb,例如bundle exec irb
,然后要求您的gem require "basecrm"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.