简体   繁体   English

Rails应用,Elastic Beanstalk和REST API失败:(Bundler :: GemNotFound)

[英]Rails App, Elastic Beanstalk and REST API failure: (Bundler::GemNotFound)

The main goal for my project is to build a rails app and REST API in rails and host on Amazon webservices such as elastic beanstalk with AmazonRDS to support. 我项目的主要目标是在rails中构建rails应用程序和REST API,并托管在Amazon webservices(例如带AmazonRDS的弹性beantalk)上以提供支持。 Then use API calls to allow for android and iOS apps to use the data through the API. 然后使用API​​调用,以允许Android和iOS应用通过API使用数据。

The step I'm on is deploying the rails app to elastic beanstalk, yet it fails. 我正在执行的步骤是将Rails应用程序部署到弹性beantalk,但失败了。 I'm using rails 3.2.13 and ruby 1.9.3, SQLite3 database, as well as 64bit linux Amazon ruby 1.9.3 for the deployment environment. 我将Rails 3.2.13和ruby 1.9.3,SQLite3数据库以及64位Linux Amazon Amazon ruby​​ 1.9.3用于部署环境。 I am following the instructions here to deploy a rails app to elastic beanstalk: http://ruby.awsblog.com/post/Tx2AK2MFX0QHRIO/Deploying-Ruby-Applications-to-AWS-Elastic-Beanstalk-with-Git 我正在按照此处的说明将Rails应用程序部署到弹性beantalk: http: //ruby.awsblog.com/post/Tx2AK2MFX0QHRIO/Deploying-Ruby-Applications-to-AWS-Elastic-Beanstalk-with-Git

Yet I keep coming up with this error: https://www.dropbox.com/s/cwvypf3neh754xs/AWSRailsErrors.PNG (I apologize for the pictures but there was no other way to demonstrate the problem efficiently) 但是我一直想出这个错误: https : //www.dropbox.com/s/cwvypf3neh754xs/AWSRailsErrors.PNG (我为图片表示歉意,但是没有其他方法可以有效地说明问题)

I have tried bundle update on SQLite3 as well as all gems for that matter, but it continues to list more. 我已经尝试过在SQLite3以及所有gem上进行捆绑更新,但是它继续列出更多信息。

I have been at it for a few days without any changes in errors, any suggestions? 我已经待了几天,没有任何错误的变化,有什么建议吗?

sqlite3 should only be used for development/test environments. sqlite3应该仅用于开发/测试环境。 In your gemfile the sqlite3 gem should be under a seperate group like this: 在您的gemfile中,sqlite3 gem应该位于单独的组中,如下所示:

group :test, :development do
    gem 'sqlite3'
end

You can then add a seperate group for whatever database you want to use for your deployment, like mysql: 然后,您可以为要用于部署的任何数据库添加单独的组,例如mysql:

group :production do
   gem 'mysql2'
end 

Also make sure to configure your database.yml file for the production database. 还要确保为生产数据库配置database.yml文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM