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

前端 未结 15 1534
逝去的感伤
逝去的感伤 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 19:04

    Restart system fixed this problem in my case

    0 讨论(0)
  • 2020-12-08 19:09

    Maybe the current working directory of the shell that's used to start your heroku process doesn't exist (maybe removed by another process, as in my case), and therefore getcwd throws an error.

    0 讨论(0)
  • 2020-12-08 19:09

    Faced a similar issue while setting up rails app locally.

    The issue was that the server was running in a directory which i had removed from another terminal window to recreate the app.

    Close terminal and do it again or go to some other directory and come back and do it...

    Anything should work..It did for me.

    0 讨论(0)
  • 2020-12-08 19:09

    I solved this problem by closing and restarting my terminal, setting the correct Ruby version in the new Terminal to

    $ rvm use 2.1.1
    

    (or whatever Ruby version is relevant to your program)

    0 讨论(0)
  • 2020-12-08 19:14

    Tried starting the rails server in another console tab.

    cd . solved it for me

    0 讨论(0)
  • 2020-12-08 19:15

    This doesn't appear to be Heroku issue as something in your code is requiring this getcwd.

    What happens if you run this application locally in production mode? Have you defined all of your dependencies for Heroku (either via a .gems file or Bundler)

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