Cannot find octokit gem when running ruby, but irb can find it -
i ran rvm implode
fresh install, reinstalled rvm , ruby. installed octokit gem want run.
when run require 'octokit'
in irb
works, when try command line, such:
ruby file.rb
file.rb is:
require 'octokit.rb' require 'csv.rb' csv.open("node_attributes.csv", "wb") |csv| csv << [octokit.user "dbussink"] csv << [octokit.user "sferik"] end
i get:
1:in require: no such file load -- /octokit (loaderror)
which ruby
yields /usr/bin/ruby
, which irb
yields /usr/bin/irb
, which octokit
yields octokit not found
.
further, rvm list
yields:
rvm rubies =* ruby-2.0.0-p247 [ x86_64 ] # => - current # =* - current && default # * - default
and, gem list octokit
yields:
*** local gems *** octokit (1.25.0, 1.4.0)
how can make sure can find octokit
when running ruby
command line? i've tried changing path, using explicit path in require command, etc., nothing seems work!
you need import require 'octokit'
not require 'octokit.rb'. see why you'd require latter (name of project on github).
Comments
Post a Comment