2012-02-17 58 views
1

我是Ruby on Rails的新手,現在嘗試安裝ROR。我按照這個教程http://blog.sudobits.com/2011/10/27/how-to-install-ruby-on-rails-in-ubuntu-11-10/Ruby on Rails安裝錯誤:找不到Gemfile

安裝完這個gem install rails創建我的項目,如rails new myproject。 此處顯示此消息

Your bundle is complete! Use捆綁顯示[gemname] to see where a bundled gem is installed.

之後我運行bundle install其顯示此錯誤Could not locate Gemfile

請幫我解決這個問題。

+0

你的myproject目錄中有Gmefile嗎?你是否從你的myproject目錄啓動這個命令? – shingara 2012-02-17 11:21:17

+0

我在我的項目目錄中運行此命令,然後顯示此消息=>您的包已完成!使用'bundle show [gemname]'來查看捆綁的gem的安裝位置。 – useCase 2012-02-17 11:24:52

回答

6

在運行bundle install之前,請確保您在項目目錄中。

例如,在運行rails new myproject後,您需要在運行bundle install之前cd myproject

+0

當我運行這個命令「rails new myproject」時,它顯示這條消息「你的包已經完成了!使用'bundle show [gemname]'來查看一個綁定的gem的安裝位置。」 – useCase 2012-02-17 11:31:18

+0

什麼是您的Rails版本? Gemfile是自Rails 3.x以來自動生成的。 – remjih 2012-02-22 11:34:51