简体   繁体   中英

error deploying a rails app to google cloud

I'm trying to deploy a rails app to google cloud follow this tutorial . The app use a postresql database. In the step Deploy a new version I had to run the follow command:

bundle exec bin/rails assets:precompile

But I'm getting this error:

[dry-types] Dry::Types.module is deprecated and will be removed in the next major version
Use Dry.Types() instead. Beware, it exports strict types by default, for old behavior use Dry.Types(default: :nominal). See more options in the changelog
/home/<user>/.rvm/rubies/ruby-2.4.9/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81:in `require'
rails aborted!
NoMethodError: undefined method `member_types' for #<Dry::Types::Hash::Constructor:0x0000562258ee3c18>
/home/<user>/.rvm/gems/ruby-2.4.9/gems/dry-types-0.15.0/lib/dry/types/constructor.rb:147:in `method_missing'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/dry-struct-0.5.1/lib/dry/struct/class_interface.rb:306:in `schema'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/dry-struct-0.5.1/lib/dry/struct/class_interface.rb:193:in `check_schema_duplication'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/dry-struct-0.5.1/lib/dry/struct/class_interface.rb:133:in `attributes'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/dry-struct-0.5.1/lib/dry/struct/class_interface.rb:113:in `attribute'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/translator-text-0.1.0/lib/translator_text/types/sentence.rb:8:in `<class:Sentence>'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/translator-text-0.1.0/lib/translator_text/types/sentence.rb:3:in `<module:Types>'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/translator-text-0.1.0/lib/translator_text/types/sentence.rb:2:in `<module:TranslatorText>'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/translator-text-0.1.0/lib/translator_text/types/sentence.rb:1:in `<top (required)>'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/translator-text-0.1.0/lib/translator_text/types.rb:30:in `require_relative'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/translator-text-0.1.0/lib/translator_text/types.rb:30:in `<top (required)>'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/translator-text-0.1.0/lib/translator-text.rb:4:in `require_relative'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/translator-text-0.1.0/lib/translator-text.rb:4:in `<top (required)>'
/home/<user>/projects/consul/config/application.rb:7:in `<top (required)>'
/home/<user>/projects/consul/Rakefile:4:in `require'
/home/<user>/projects/consul/Rakefile:4:in `<top (required)>'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/railties-5.0.7.2/lib/rails/commands/rake_proxy.rb:13:in `block in run_rake_task'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/railties-5.0.7.2/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/home/<user>/.rvm/gems/ruby-2.4.9/gems/railties-5.0.7.2/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<top (required)>'
/home/<user>/.rvm/rubies/ruby-2.4.9/bin/bundle:30:in `block in <main>'
/home/<user>/.rvm/rubies/ruby-2.4.9/bin/bundle:22:in `<main>'
/home/<user>/.rvm/gems/ruby-2.4.9/bin/ruby_executable_hooks:24:in `eval'
/home/<user>/.rvm/gems/ruby-2.4.9/bin/ruby_executable_hooks:24:in `<main>'
(See full trace by running task with --trace)

Anyone know how can I fix it?

Thanks!

It seems that your error is related to the library dry-types . As per the error:

[dry-types] Dry::Types.module is deprecated and will be removed in the next major version

It seems that this version being used will be removed and you need to update it. I would recommend you to give it a try and check this, as this seems to affect rails, which is being used by Google Cloud Platform to deploy your application.

More information about dry-types can be found on the library's Github repository here

Let me know if the information helped you!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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