Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `shellescape' for Shellwords:Module #21

Closed
wrengr opened this issue Dec 23, 2014 · 6 comments
Closed

undefined method `shellescape' for Shellwords:Module #21

wrengr opened this issue Dec 23, 2014 · 6 comments

Comments

@wrengr
Copy link

wrengr commented Dec 23, 2014

I get the following error when trying to create a new git clone of a darcs repo:

darcs-to-git:169:in `output_of': undefined method `shellescape' for Shellwords:Module (NoMethodError)
    from darcs-to-git:169:in `map'
    from darcs-to-git:169:in `output_of'
    from darcs-to-git:460

Setup:

  • darcs-to-git 0.2
  • darcs 2.5
  • git 2.2.1
  • ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]
  • OS X 10.5.8
@wrengr
Copy link
Author

wrengr commented Dec 23, 2014

Fixed by upgrading to Ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-darwin9.0]

@wrengr wrengr closed this as completed Dec 23, 2014
@purcell
Copy link
Owner

purcell commented Dec 23, 2014

Ah, yes, that method was added in Ruby 1.9. I should add a version check.

purcell added a commit that referenced this issue Dec 23, 2014
@tripleee
Copy link

I seem to have Ruby 1.8.7 where Ruby is available at all. It seems that this version is actually sufficient (see tangentially the first sentence in this StackOverflow question). I'm looking at Ubuntu 12.04 and Debian Squeeze. The following change allowed me to import a Darcs repo on Ruby 1.8.7.

--- a/darcs-to-git
+++ b/darcs-to-git
@@ -24,8 +24,8 @@
 # TODO: use default repo if none was supplied
 # TODO: handle *-darcs-backupN files?

-unless RUBY_VERSION >= "1.9"
-  STDERR.printf("Ruby >= 1.9 is required. You have %s\n", RUBY_VERSION)
+unless RUBY_VERSION >= "1.8.7"
+  STDERR.printf("Ruby >= 1.8.7 is required. You have %s\n", RUBY_VERSION)
   exit 1
 end

@purcell
Copy link
Owner

purcell commented Feb 18, 2015

@tripleee Okay, so 0c4351b should fix things for you. Please let me know if it doesn't.

@tripleee
Copy link

Wow, thanks for a really quick fix!

@purcell
Copy link
Owner

purcell commented Feb 18, 2015

Happy to help. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants