bundle install returns “Could not locate Gemfile”

前端 未结 9 1155
轻奢々
轻奢々 2020-12-12 15:22

I\'m new to Rails and am currently working through a guide. The guide states:

Use a text editor to update the Gemfile needed by Bundler with the co

相关标签:
9条回答
  • 2020-12-12 15:50

    You may also indicate the path to the gemfile in the same command e.g.

    BUNDLE_GEMFILE="MyProject/Gemfile.ios" bundle install
    
    0 讨论(0)
  • 2020-12-12 15:59

    When I had similar problem gem update --system helped me. Run this before bundle install

    0 讨论(0)
  • 2020-12-12 16:02

    You must be in the same directory of Gemfile

    0 讨论(0)
  • 2020-12-12 16:02

    I had this problem on Ubuntu 18.04. I updated the gem

    sudo gem install rails
    sudo gem install jekyll
    sudo gem install jekyll bundler
    cd ~/desiredFolder
    jekyll new <foldername>
    cd <foldername> OR 
    bundle init
    bundle install
    bundle add jekyll
    bundle exec jekyll serve
    

    All worked and goto your browser just go to http://127.0.0.1:4000/ and it really should be running

    0 讨论(0)
  • 2020-12-12 16:03

    I had this problem as well on an OSX machine. I discovered that rails was not installed... which surprised me as I thought OSX always came with Rails. To install rails

    • sudo gem install rails
    • to install jekyll I also needed sudo
    • sudo gem install jekyll bundler
    • cd ~/Sites
    • jekyll new <foldername>
    • cd <foldername> OR cd !$ (that is magic ;)
    • bundle install
    • bundle exec jekyll serve
    • Then in your browser just go to http://127.0.0.1:4000/ and it really should be running
    0 讨论(0)
  • 2020-12-12 16:06

    You just need to change directories to your app, THEN run bundle install :)

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