jiratotaskmanagers icon indicating copy to clipboard operation
jiratotaskmanagers copied to clipboard

Error uninitialized constant ConfigStore::FileUtils (NameError)

Open datagen24 opened this issue 8 years ago • 1 comments

Hi newly set up on OS X Sierra, might be specific to me not sure, i have tired it with several versions of ruby.

Error: JIRA Password:

** Task App Config

Omnifocus App Name ([Enter] for Omnifocus):

Project Name: ([Enter] for Work):

Context: ([Enter] for Office):

Store config? (y/n) y Running JQL: assignee = currentUser() order by priority desc

  • Pg: 1 Storing config Storing on /Users/scp/.jiratotaskmanagers/jira_to_omnifocus.yml /Users/scp/bin/lib/config_store.rb:86:in store_config': uninitialized constant ConfigStore::FileUtils (NameError) Did you mean? FileTest from /Users/scp/bin/lib/task_sources/jira/jira_to_jxa_app.rb:125:inmain' from jira-to-omnifocus:28:in `
    '

Gem Env: Stevens-Mac:lib scp$ gem env RubyGems Environment:

  • RUBYGEMS VERSION: 2.5.1
  • RUBY VERSION: 2.3.1 (2016-04-26 patchlevel 112) [x86_64-darwin16]
  • INSTALLATION DIRECTORY: /Users/scp/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0
  • USER INSTALLATION DIRECTORY: /Users/scp/.gem/ruby/2.3.0
  • RUBY EXECUTABLE: /Users/scp/.rbenv/versions/2.3.1/bin/ruby
  • EXECUTABLE DIRECTORY: /Users/scp/.rbenv/versions/2.3.1/bin
  • SPEC CACHE DIRECTORY: /Users/scp/.gem/specs
  • SYSTEM CONFIGURATION DIRECTORY: /Users/scp/.rbenv/versions/2.3.1/etc
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86_64-darwin-16
  • GEM PATHS:
    • /Users/scp/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0
    • /Users/scp/.gem/ruby/2.3.0
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:
    • https://rubygems.org/
  • SHELL PATH:
    • /Users/scp/.rbenv/versions/2.3.1/bin
    • /usr/local/Cellar/rbenv/1.0.0/libexec
    • /Users/scp/.rbenv/shims
    • /Users/scp/.rbenv/shims
    • /usr/local/bin
    • /usr/bin
    • /bin
    • /usr/sbin
    • /sbin
    • /Applications/Server.app/Contents/ServerRoot/usr/bin
    • /Applications/Server.app/Contents/ServerRoot/usr/sbin

Bundle env with the latest rubyenv:

Stevens-Mac:lib scp$ ruby /usr/local/bin/bundle env Environment

Bundler   1.13.2
Rubygems  2.5.1
Ruby      2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]
Git       2.8.4 (Apple Git-73)

../Gemfile

source 'https://rubygems.org'
#ruby "2.1.5"

gem 'jira-ruby', '0.1.14'
gem 'crypt', '~> 2'
gem 'password', '1.3' # TODO Are we even using this?
gem 'getopt', '1.4.2'
gem 'rest-client' # For jiratoomnifocus. Jiratothings uses jira-ruby

# gem 'byebug'

../Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    activesupport (5.0.0.1)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (~> 0.7)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    concurrent-ruby (1.0.2)
    crypt (2.2.1)
    domain_name (0.5.20160826)
      unf (>= 0.0.5, < 1.0.0)
    getopt (1.4.2)
    http-cookie (1.0.3)
      domain_name (~> 0.5)
    i18n (0.7.0)
    jira-ruby (0.1.14)
      activesupport
      oauth (~> 0.4.7)
    mime-types (3.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2016.0521)
    minitest (5.9.1)
    netrc (0.11.0)
    oauth (0.4.7)
    password (1.3)
      activesupport (>= 2.0.2)
    rest-client (2.0.0)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 4.0)
      netrc (~> 0.8)
    thread_safe (0.3.5)
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.7.2)

PLATFORMS
  ruby

DEPENDENCIES
  crypt (~> 2)
  getopt (= 1.4.2)
  jira-ruby (= 0.1.14)
  password (= 1.3)
  rest-client

BUNDLED WITH
   1.13.2

datagen24 avatar Oct 02 '16 21:10 datagen24

This fixed it for me.

$ git diff
diff --git a/Gemfile b/Gemfile
index d3e99ae..2fa7935 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,5 +1,5 @@
 source 'https://rubygems.org'
-ruby "2.1.5"
+ruby "2.2.5"

 gem 'jira-ruby', '0.1.14'
 gem 'crypt', '~> 2'
diff --git a/lib/task_sources/jira/jira_to_jxa_app.rb b/lib/task_sources/jira/jira_to_jxa_app.rb
index fe22329..34eeb15 100755
--- a/lib/task_sources/jira/jira_to_jxa_app.rb
+++ b/lib/task_sources/jira/jira_to_jxa_app.rb
@@ -24,6 +24,8 @@ require 'getoptlong'
 require 'yaml'
 require 'jira'
 require 'json'
+require 'fileutils'
+require 'tempfile'
 require File.join(File.dirname(__FILE__), '../../config_store')

 class JiraToJxaApp

ejmeij avatar Jul 05 '17 12:07 ejmeij