Home>

See this article ,
I'm trying to deploy a rails app on AWS.
But when you run rake db: create RAILS_ENV = production

rake aborted!
NoMethodError: undefined method `flat_map 'for" i # MySQL. Versions 5.5.8 and up are supported. ": String
/ var/www/rails/app/Rakefile: 6: in `<top (required)>'
Caused by:
Bootsnap :: LoadPathCache :: FallbackScan:
(See full trace by running task with --trace)


Error.
mysql version is
mysql Ver 14.14 Distrib 5.7.28, for Linux
Is this going to be down to 5.5.8?
Also, as the article, sudo service mysqld start is also executed in advance

Redirecting to/bin/systemctl start mysqld.service


Just come back.
If i check sudo service mysqld status, it seems to be active, but is it possible that it is tripped by starting the daemon in the first place?

  • Answer # 1

      

    Versions 5.5.8 and up are supported
      So, MySQL 5.7.28 is supported.
      If you are currently using MySQL 5.5, you will not have to bother to specify that version.

    Several things are possible

    You are connected to somewhere other than the local MySQL server

    The version you are referring to points to something else that is not MySQL

    Did you say

    ?
    As mentioned earlier, it's hard to imagine the case of using such an old version of MySQL, so I feel like there is a possibility that the version of some necessary package is old.

    Although the following is a supplement,
    The reason thatRedirecting to/bin/systemctl start mysqld.serviceappears is probably because you are using Amazon Linux2.
    In the original article, it is written that "top" is selected, but since there was no Amazon Linux2 when the original article was written, there is a trap there. (The original article is quite old and there are a number of places that seem to require supplementation, but it seems that it has not been updated much.) Amazon Linux2 is CentOS7 (RHEL7 may be better), Amazon Linux is CentOS6 (RHEL6), but the command system is slightly different in the 7 system,servicecommand Instead, the service is managed by thesystemctlcommand.
    Theservicecommand seems to have an alias attached to thesystemctlcommand. When theservicecommand is used as in the 6th series,

    The

    servicecommand works as expected for the time being, but with the 7 system
    systemctl start mysqld
    systemctl status mysqld
    It will feel like that. It may be a little difficult to get used to, because the order of commands and service names changes.
    * Please add sudo if necessary (unless you are a root user, startup and shutdown should normally require sudo)