bonapa1856
Joined 3/1/2021
bonapa1856 said about 3 years ago on Deploying to Amazon Linux 2 :
According to eb-engine.logs It seems like I don't have yarn. But when I do yarn --version on my machine it show:
$ yarn --version
[DEPRECATION] The trollop gem has been renamed to optimist and will no longer be supported. Please switch to optimist as soon as possible.
Yarn v0.1.1 2011 Jesper Kjeldgaard
Upon doing rails assets:precompile

 rails assets:precompile
Traceback (most recent call last):
        4: from /home/pop/.rvm/gems/ruby-2.7.2/bin/ruby_executable_hooks:22:in `<main>'
        3: from /home/pop/.rvm/gems/ruby-2.7.2/bin/ruby_executable_hooks:22:in `eval'
        2: from /home/pop/.rvm/gems/ruby-2.7.2/bin/yarn:23:in `<main>'
        1: from /home/pop/.rvm/gems/ruby-2.7.2/gems/bundler-2.2.11/lib/bundler/rubygems_integration.rb:390:in `block in replace_bin_path'
/home/pop/.rvm/gems/ruby-2.7.2/gems/bundler-2.2.11/lib/bundler/rubygems_integration.rb:362:in `block in replace_bin_path': can't find executable yarn for gem yarn. yarn is not currently included in the bundle, perhaps you meant to add it to your Gemfile? (Gem::Exception)
Yarn not installed. Please download and install Yarn from https://yarnpkg.com/lang/en/docs/install/
Exiting!

What could be the problem? As is it not letting me deploy?

bonapa1856 said about 3 years ago on Deploying to Amazon Linux 2 :
  Your rails ver is 6.1.3 and my rails app is 5.2.0. By setting Rails_SKIP_MIGRATION = true I no more get asset precompile error.
Also, it doesn't show root behind config folder . I'm a IAM user is that an issue?
or.

-sh-4.2$ cd .bundle/
-sh-4.2$ ls
config
-sh-4.2$ ls -lh
total 4.0K
-rw-r--r-- 1 webapp webapp 94 Mar  3 07:58 config
-sh-4.2$ cat config 
---
BUNDLE_DEPLOYMENT: "true"
BUNDLE_PATH: "vendor/bundle"
BUNDLE_WITHOUT: "test:development"
-sh-4.2$ 

bonapa1856 said about 3 years ago on Deploying to Amazon Linux 2 :
  Ya Yarn is there.

[ec2-user@ip-172-31-28-237 ~]$ yarn -v
1.22.5

bonapa1856 said about 3 years ago on Deploying to Amazon Linux 2 :
$ node -v
v14.16.0
$ yarn -v
1.22.5
$ rails assets:precompile
Warning: the running version of Bundler (2.1.4) is older than the version that created the lockfile (2.2.11). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.2.11`.
Compiling...
Compilation failed:
yarn run v1.22.5
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


error Command "webpack" not found.


bonapa1856 said about 3 years ago on Deploying to Amazon Linux 2 :
Thank you for the support man! I have resolved the assets issue. Now Iam just stuck on db part. Some help on this one would be highly appreciated thanks in advance.

[rake tasks]. Stop running the command. Error: running rake task db:migrate failed with error command bundle exec rake db:migrate failed with error Command /bin/su webapp -c bundle exec rake db:migrate failed with error exit status 1. Stderr:rake aborted!
PG::ConnectionBad: could not translate host name "xxxxxxxxxxxxxxxxxxx1.rds.amazonaws.com:5432" to address: Name or service not known