Yelp API在迁移时缺少API密钥错误

Yelp API在迁移时缺少API密钥错误,api,yelp,Api,Yelp,我在执行rakedb:migrate时遇到此错误 Yelp::Error::MissingAPIKeys:您缺少一个API密钥 /Users/subhajit/grub_food/config/initializers/yelp.rb:1:in`' My application.yml包含所有API密钥。有两种可能的情况: 第一个案例 您没有在config/Yelp.rb(新生成的)文件中添加Yelp API键,如下所示 Yelp.client.configure do |config| c

我在执行
rakedb:migrate
时遇到此错误

Yelp::Error::MissingAPIKeys:您缺少一个API密钥 /Users/subhajit/grub_food/config/initializers/yelp.rb:1:in`'


My application.yml包含所有API密钥。

有两种可能的情况:
第一个案例 您没有在
config/Yelp.rb
(新生成的)文件中添加
Yelp API键,如下所示

Yelp.client.configure do |config|
  config.consumer_key = 'myconsumerkey'
  config.consumer_secret = 'consumersecretkey'
  config.token = 'mytokenkey'
  config.token_secret = 'tokensecret'
end
要拿到这些钥匙,请转到

第二种情况:
config/yelp.rb
文件中包含密钥后,您可能无法重新启动服务器