解决方法
一旦创建了Gemfile,就在shell中运行命令bundle install.
此命令将查看您的Gemfile并在指定的版本上安装相关的Gems.
安装Gemfiles是因为在你的Gemfile中你指出了可以从中下载gem的源.
您可以通过在shell中键入bundle init来创建Gemfile
我添加了一个Gemfile示例供您参考:
source "https://rubygems.org" # where gems will be downloaded from ruby "2.2.3" # ruby version,change for the one you use gem "sinatra" gem "sinatra-flash" gem "sinatra-partial" gem "bcrypt" gem "dm-validations" gem "dm-transactions" gem "data_mapper" gem "dm-postgres-adapter" gem "pg" gem "database_cleaner" group :test do # you can make groups for test,development,production.. gem "rspec" gem "capybara" gem "rspec-sinatra" gem "cucumber" gem "coveralls",require: false end