运行rake routes
时出错。请建议。
$ rake routes
rake aborted!
LoadError: incompatible library version -
/home/latei/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/sqlite3_native.so
/home/latei/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3.rb:6:in
`require'
/home/latei/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3.rb:6:in
`rescue in <top (required)>'
/home/latei/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3.rb:2:in
`<top (required)>'
/home/latei/Desktop/rails/alpha-blog/config/application.rb:7:in `<top
(required)>' /home/latei/Desktop/rails/alpha-blog/Rakefile:4:in
`require_relative' /home/latei/Desktop/rails/alpha-blog/Rakefile:4:in
`<top (required)>'
/home/latei/.rvm/gems/ruby-2.4.1@global/gems/rake-12.0.0/exe/rake:27:in
`<top (required)>' LoadError: cannot load such file --
sqlite3/2.3/sqlite3_native
/home/latei/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3.rb:4:in
`require'
/home/latei/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3.rb:4:in
`<top (required)>'
/home/latei/Desktop/rails/alpha-blog/config/application.rb:7:in `<top
(required)>' /home/latei/Desktop/rails/alpha-blog/Rakefile:4:in
`require_relative' /home/latei/Desktop/rails/alpha-blog/Rakefile:4:in
`<top (required)>'
/home/latei/.rvm/gems/ruby-2.4.1@global/gems/rake-12.0.0/exe/rake:27:in
`<top (required)>' (See full trace by running task with --trace)
答案 0 :(得分:0)
您可能缺少使用sqlite gem所需的必要开发库。
在debian中,可以使用以下命令安装:
sudo apt-get install libsqlite-3
答案 1 :(得分:0)
我不确定,但我认为问题出在您的宝石版本中,试试这个:
gem 'sqlite3', '~> 1.3', '>= 1.3.10'
然后$ bundle install