HousePricing icon indicating copy to clipboard operation
HousePricing copied to clipboard

rake 导入数据问题

Open disappearedgod opened this issue 7 years ago • 5 comments

image

disappearedgod avatar May 27 '17 07:05 disappearedgod

bundle install 成功没,提示的是bcrypt这个gem没装好

http://blog.csdn.net/ppp8300885/article/details/52594839

PENGZhaoqing avatar May 27 '17 08:05 PENGZhaoqing

frankdeMacBook-Air:housepricing Jiawen$ bundle exec rake db:migrate
/Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-11.2.2/lib/rake/ext/fixnum.rb:4: warning: constant ::Fixnum is deprecated
/Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/sprockets-3.6.0/lib/sprockets/processor_utils.rb:110: warning: constant ::Fixnum is deprecated
/Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/sprockets-3.6.0/lib/sprockets/processor_utils.rb:111: warning: constant ::Bignum is deprecated
/Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.2/lib/concurrent/map.rb:206: warning: constant ::Fixnum is deprecated
/Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/thread_safe-0.3.5/lib/thread_safe/cache.rb:155: warning: constant ::Fixnum is deprecated
/Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
rake aborted!
SystemStackError: stack level too deep
/Users/Jiawen/HousePricing/config/environment.rb:5:in `<top (required)>'
/Users/Jiawen/.rbenv/versions/2.4.2/bin/bundle:23:in `load'
/Users/Jiawen/.rbenv/versions/2.4.2/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
frankdeMacBook-Air:housepricing Jiawen$ 

我也遇到了类似问题,请问什么原因

Jiawenma avatar Dec 12 '17 15:12 Jiawenma

https://stackoverflow.com/questions/3456304/rake-aborted-stack-level-too-deep

PENGZhaoqing avatar Dec 13 '17 01:12 PENGZhaoqing

照它上面做了,但是启动服务器的时候又报错

stacklevel too deep(system stack error)=> Rails 4.2.5.2 application starting in development on http://localhost:4000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
/Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
Exiting
/Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:125:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError)
	from /Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
	from /Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
	from /Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
	from /Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
	from /Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
	from /Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
	from /Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
	from /Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
	 ... 10911 levels...
	from /Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
	from /Users/Jiawen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-4.2.5.2/lib/rails/commands.rb:17:in `<top (required)>'
	from bin/rails:4:in `require'
	from bin/rails:4:in `<main>'

Jiawenma avatar Dec 13 '17 13:12 Jiawenma

我猜你是用的ruby 2.4.0配上的rails 4.2.5.2, 换个ruby版本2.2.4,rails版本保持不变, wiki中有

PENGZhaoqing avatar Dec 14 '17 02:12 PENGZhaoqing