gpt4 book ai didi

mysql - rake gem :install shows error (database is not migrating)/

转载 作者:可可西里 更新时间:2023-11-01 06:30:12 25 4
gpt4 key购买 nike

  1. ruby :1.8.7
  2. rails :2.3.8
  3. 数据库:我的 SQL

数据库已创建,但当我迁移数据库时显示错误。所以如果有人可以帮助我解决这个问题,那对我来说很好。


$ rake db:migrate
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
DEPRECATION WARNING: Rake tasks in vendor/plugins/active_record_tableless/tasks, vendor/plugins/annotate-models/tasks, vendor/plugins/asset_auto_include/tasks, vendor/plugins/hoptoad_notifier/tasks, vendor/plugins/jrails/tasks, vendor/plugins/sitemap_generator-plugin/tasks, vendor/plugins/thinking-sphinx/tasks, and vendor/plugins/tiny_mce/tasks are deprecated. Use lib/tasks instead. (called from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/rails-2.3.8/lib/tasks/rails.rb:10)
rake aborted!
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/tinypass-1.0.1/lib/tinypass/builder/client_parser.rb:3: invalid regular expression; there's no previous pattern, to which '{' would define cardinality at 1: /{\w\w\w}/
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/tinypass-1.0.1/lib/tinypass/builder/client_parser.rb:44: invalid regular expression; there's no previous pattern, to which '{' would define cardinality at 2: /^{...}/
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/tinypass-1.0.1/lib/tinypass/builder.rb:2
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/tinypass-1.0.1/lib/tinypass.rb:1
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/rails-2.3.8/lib/rails/gem_dependency.rb:215:in `load'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/rails-2.3.8/lib/initializer.rb:307:in `load_gems'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/rails-2.3.8/lib/initializer.rb:307:in `each'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/rails-2.3.8/lib/initializer.rb:307:in `load_gems'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/rails-2.3.8/lib/initializer.rb:164:in `process'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/rails-2.3.8/lib/initializer.rb:113:in `send'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/rails-2.3.8/lib/initializer.rb:113:in `run'
/home/aspireedge/Aspiree/***********/config/environment.rb:15
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/****/rails-2.3.8/lib/tasks/misc.rake:4
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

当我启动服务器时也显示错误。所以如果有人可以帮助我解决这个问题,那对我来说很好。

    $ruby script/server 
=> Booting WEBrick
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
/usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/tinypass-1.0.1/lib/tinypass/builder/client_parser.rb:3: invalid regular expression; there's no previous pattern, to which '{' would define cardinality at 1: /{\w\w\w}/ (SyntaxError)
/home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/tinypass-1.0.1/lib/tinypass/builder/client_parser.rb:44: invalid regular expression; there's no previous pattern, to which '{' would define cardinality at 2: /^{...}/
from /usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/tinypass-1.0.1/lib/tinypass/builder.rb:2
from /usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/tinypass-1.0.1/lib/tinypass.rb:1
from /usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/rails-2.3.8/lib/rails/gem_dependency.rb:215:in `load'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/rails-2.3.8/lib/initializer.rb:307:in `load_gems'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/rails-2.3.8/lib/initializer.rb:307:in `each'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/rails-2.3.8/lib/initializer.rb:307:in `load_gems'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/rails-2.3.8/lib/initializer.rb:164:in `process'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/rails-2.3.8/lib/initializer.rb:113:in `send'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/rails-2.3.8/lib/initializer.rb:113:in `run'
from /home/aspireedge/Aspiree/************/config/environment.rb:15
from /usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
from /home/aspireedge/.rvm/gems/ruby-1.8.7-**********/******/rails-2.3.8/lib/commands/server.rb:84
from /usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/server:3

当我更改 Client_phaser.rb 的代码时。

    rake db:migrate
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
DEPRECATION WARNING: Rake tasks in vendor/plugins/active_record_tableless/tasks, vendor/plugins/annotate-models/tasks, vendor/plugins/asset_auto_include/tasks, vendor/plugins/hoptoad_notifier/tasks, vendor/plugins/jrails/tasks, vendor/plugins/sitemap_generator-plugin/tasks, vendor/plugins/thinking-sphinx/tasks, and vendor/plugins/tiny_mce/tasks are deprecated. Use lib/tasks instead. (called from /home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/rails-2.3.8/lib/tasks/rails.rb:10)

rake aborted!
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:50: odd number list for Hash
o1: build_offer(request.primary_offer),
^
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:50: syntax error, unexpected ':', expecting '}'
o1: build_offer(request.primary_offer),
^
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:50: syntax error, unexpected ',', expecting kEND
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:52: syntax error, unexpected ':', expecting '='
v: Config::MSG_VERSION,
^
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:52: dynamic constant assignment
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:53: syntax error, unexpected ':', expecting '='
cb: request.callback
^
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:54: syntax error, unexpected '}', expecting kEND
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:66: odd number list for Hash
rid: offer.resource.rid,
^
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:66: syntax error, unexpected ':', expecting '}'
rid: offer.resource.rid,
^
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:67: syntax error, unexpected ':', expecting '='
rnm: offer.resource.name,
^
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:68: syntax error, unexpected ':', expecting '='
rurl: offer.resource.url,
^
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:69: syntax error, unexpected ':', expecting '='
pos: build_price_options(offer.pricing.price_options),
^
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:69: syntax error, unexpected ',', expecting kEND
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:71: syntax error, unexpected '}', expecting kEND
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:91: odd number list for Hash
price: price_option.price || '',
^
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:91: syntax error, unexpected ':', expecting '}'
price: price_option.price || '',
^
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:91: syntax error, unexpected ',', expecting kEND
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:92: syntax error, unexpected ',', expecting kEND
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder/json_msg_builder.rb:94: syntax error, unexpected '}', expecting kEND
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass/builder.rb:4
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/tinypass-1.0.1/lib/tinypass.rb:1
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/rails-2.3.8/lib/rails/gem_dependency.rb:215:in `load'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/rails-2.3.8/lib/initializer.rb:307:in `load_gems'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/rails-2.3.8/lib/initializer.rb:307:in `each'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/rails-2.3.8/lib/initializer.rb:307:in `load_gems'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/rails-2.3.8/lib/initializer.rb:164:in `process'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/rails-2.3.8/lib/initializer.rb:113:in `send'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/rails-2.3.8/lib/initializer.rb:113:in `run'
/home/aspireedge/Aspiree/pyromaniac/config/environment.rb:78
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/home/aspireedge/.rvm/gems/ruby-1.8.7-head@pyro/gems/rails-2.3.8/lib/tasks/misc.rake:4
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

最佳答案

问题出在 tinypass gem 中。 README声明该 gem 需要 Ruby 1.9.2 或更高版本。

共有三个选项:

  1. 找到与 ruby​​ 1.8.7 版本兼容的 tinypass 版本。
  2. fork 这个 gem 并实现对旧 ruby 的支持。
  3. 更新您的应用程序以使用更新的 Ruby。

关于mysql - rake gem :install shows error (database is not migrating)/,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45475679/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com