Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rake gems:install shows error (database is not migrating)/

  1. Ruby: 1.8.7
  2. Rails: 2.3.8
  3. Db: my SQL

The database is created but When I migrate database it shows error. so if any one can help me out with this issue so it's fine for me.


$ 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)

is also show error when I start the server. so if any one can help me out with this issue so it's fine for me.

    $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

When I CHange the code of 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)
like image 488
Ronak Bhatt Avatar asked Aug 03 '17 05:08

Ronak Bhatt


1 Answers

The problem is in tinypass gem. The README states that that gem requires Ruby 1.9.2 or above.

There are three options available:

  1. Find a version of tinypass compatible with ruby 1.8.7 version .
  2. Fork this gem and implement support for older rubies.
  3. Update your application to use newer Ruby.
like image 115
Tema Bolshakov Avatar answered Oct 28 '22 07:10

Tema Bolshakov