“No such file or directory - getcwd” error on rubygems on Mac Os Lion

前端 未结 15 1533
逝去的感伤
逝去的感伤 2020-12-08 18:51

I\'m trying to launch a heroku console that uses rubygems but I keep getting this error:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/         


        
相关标签:
15条回答
  • 2020-12-08 18:52

    I had that same issue.... running sudo gem update --system fixed the problem... give it a try.

    0 讨论(0)
  • 2020-12-08 18:54

    I encounter a same one, it happened when the working directory has actually been removed.

    0 讨论(0)
  • 2020-12-08 18:55

    as explained by gerardk you could try this before launching back heroku console

    $ pwd #ie: /mywork
    $ cd ..
    $ cd [pwd] #ie: cd mywork
    

    now go launch back heroku console

    0 讨论(0)
  • 2020-12-08 18:56

    I worked around this error by shutting down the server, restarting my terminal, then restarting the server.

    0 讨论(0)
  • 2020-12-08 18:57

    This happened to me. It turned out I had deleted the folder I was running the command in.

    0 讨论(0)
  • 2020-12-08 18:59

    In my case, I was in a directory that had "unusual" characters in its name: /Volumes/Members/Finance & Accounting/-MC 2008, 7848/2020.

    And also, I was in a remote directory, as Mac users will recognize.

    I simply did push ~ and ran the command again, then did popd to get back to my remote directory with odd characters in the name.

    It could be that gem is ill-behaved in the face of directory names containing whitespace, or it could be that it doesn't work on networked directories.

    The bash built-in pwd worked just fine in the remote directory with the funny name.

    This whole thing makes me a bit nervous about gem.

    0 讨论(0)
提交回复
热议问题