我正在测试当前部署在其他提供程序上的Rails应用程序在Elastic Beanstalk上的新部署。该应用程序成功部署,并且可以正常浏览。
但是,如果在切换到环境后尝试启动控制台(bundle exec rails c
),则会得到以下信息:
Could not find rake-12.3.1 in any of the sources
Run `bundle install` to install missing gems.
bundle list
为我提供了所有已安装的宝石:
* CFPropertyList (2.3.3)
* RedCloth (4.2.9)
.
. (removed to allow it to fit into the question character limit)
.
* will_paginate-bootstrap (1.0.1)
* xml-simple (1.1.5)
* xpath (2.0.0)
bundle env
给了我以下内容:
```
Bundler 1.16.2
Platforms ruby, x86_64-linux
Ruby 2.3.8p459 (2018-10-18 revision 65136) [x86_64-linux]
Full Path /opt/rubies/ruby-2.3.8/bin/ruby
Config Dir /opt/rubies/ruby-2.3.8/etc
RubyGems 2.7.7
Gem Home /home/ec2-user/.gem/ruby/2.3.8
Gem Path /home/ec2-user/.gem/ruby/2.3.8:/opt/rubies/ruby-2.3.8/lib/ruby/gems/2.3.0
User Path /home/ec2-user/.gem/ruby/2.3.0
Bin Dir /home/ec2-user/.gem/ruby/2.3.8/bin
Tools
Git 2.14.5
RVM not installed
rbenv not installed
chruby 0.3.9
```
## Bundler Build Metadata
```
Built At 2019-01-19
Git SHA
Released Version false
```
## Bundler settings
```
without
Set for your local app (/var/app/current/.bundle/config): [:test, :development]
Set via BUNDLE_WITHOUT: [:test, :development]
disable_shared_gems
Set via BUNDLE_DISABLE_SHARED_GEMS: true
path
Set via BUNDLE_PATH: "vendor/bundle"
```
## Gemfile
### Gemfile
```ruby
source 'https://rubygems.org'
gem 'rails', '~> 4.2.0'
gem 'rails-i18n', '~> 4.0.0'
gem 'sprockets-es6', '~> 0.9.2'
.
. (removed to allow it to fit into the question character limit)
.
PLATFORMS
ruby
DEPENDENCIES
RedCloth (~> 4.2.3)
active_scaffold!
activemodel
activerecord-session_store
acts-as-taggable-on (~> 4.0)
awesomemailer!
axlsx!
better_errors
binding_of_caller
bootstrap-editable-rails
bootstrap-growl-rails
bundler (>= 1.13.6)
byebug
calendar_date_select
capybara
carrierwave
coffee-rails
cucumber-rails
daemons (= 1.1.0)
database_cleaner
decent_exposure
delayed_job_active_record
delayed_job_groups_plugin
dynamic_form
email_spec
exception_notification
factory_girl
factory_girl_rails
faker
fog
font-awesome-rails (~> 4.5)
geokit-rails
haml-rails
html2haml
icalendar
inky-rb
intercom-rails
jquery-rails
jquery-ui-rails
less-rails (~> 3.0.0)
less-rails-bootstrap!
letter_opener
mini_magick
mocha
mysql2 (~> 0.3.0)
name_splitter
newrelic_rpm
omniauth-stripe-connect
page_title_helper
paperclip (~> 4.3)
pickle
plivo
powder
premailer-rails
protected_attributes
puma
rack (= 1.6.10)
rails (~> 4.2.0)
rails-dom-testing
rails-i18n (~> 4.0.0)
rails-jquery-autocomplete
rails-observers
rails_autolink
rake
rb-readline
recaptcha
redactor2_rails
responders
rmagick
rspec-collection_matchers
rspec-expectations
rspec-html-matchers
rspec-rails (~> 3.1)
rspec-rails-mocha!
rspec-retry
rspec_junit_formatter
rubyzip
sanitize_email
sass-rails
search_cop!
selenium-webdriver
sendgrid
sendgrid-ruby
shoulda
shoulda-matchers
simple_form
skylight
spring
spring-commands-rspec
sprockets-es6 (~> 0.9.2)
squeel
stripe
stripe-ruby-mock (~> 2.5.0)
syntax
therubyracer
thin
timecop (= 0.3.5)
truncate_html
uglifier
unicorn
validates_timeliness (~> 3.0.2)
will_paginate (~> 3.0)
will_paginate-bootstrap
xray-rails
BUNDLED WITH
1.16.1
```
我可以成功运行rake任务:bundle exec rake cron:create_remittance_records
使用相同的Gemfile和Gemfile.lock以及在AWS上使用相同设置部署的新rails 4.2.11,我可以运行bundle exec rails c
,因此它必须在我的应用程序中运行,但是我在关于可能会影响rails装载宝石的能力的损失。
AWS支持人员也无法解决问题。
非常感谢您的帮助。