尝试耙 assets:precompile 时无法加载 sqlite3_native.so
Cannot load sqlite3_native.so when trying to rake assets:precompile
我正在 rails 上从这个网站学习 Ruby 的教程:https://rails-3-2.railstutorial.org/book/beginning#sec-heroku_setup
我目前被困在告诉我 运行 命令的部分:
rake assets:precompile
它给我这个错误:
/home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/activesupport-3.2.16/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
rake aborted!
LoadError: incompatible library version - /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3/sqlite3_native.so
/home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:6:in require' /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:6:in
rescue in <top (required)>'
/home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:2:in <top (required)>' /home/myName/Desktop/rails_projects/first_app/config/application.rb:7:in
<top (required)>'
/home/myName/Desktop/rails_projects/first_app/Rakefile:5:in <top (required)>' /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/rake-12.2.1/exe/rake:27:in
<top (required)>'
Caused by:
LoadError: cannot load such file -- sqlite3/2.3/sqlite3_native
/home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:4:in require' /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:4:in
<top (required)>'
/home/myName/Desktop/rails_projects/first_app/config/application.rb:7:in <top (required)>' /home/myName/Desktop/rails_projects/first_app/Rakefile:5:in
<top (required)>'
/home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/rake-12.2.1/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)
据我了解,我认为我的 sqlite3 已损坏,因为我确保安装了 sqlite3(“gem 列表” returns 我是 gem 的列表安装了 s 并安装了 sqlite 1.3.5)。
因此我尝试重新安装 sqlite3 1.3.5 但没有成功。我对如何解决这个问题感到困惑,非常感谢任何帮助!
谢谢!
我以某种方式修复了它。
我不太确定它为什么起作用,但它似乎在 re-installing 捆绑器之后起作用。
gem uninstall bundler
gem install bundler
我正在 rails 上从这个网站学习 Ruby 的教程:https://rails-3-2.railstutorial.org/book/beginning#sec-heroku_setup
我目前被困在告诉我 运行 命令的部分:
rake assets:precompile
它给我这个错误:
/home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/activesupport-3.2.16/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now rake aborted! LoadError: incompatible library version - /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3/sqlite3_native.so /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:6:in
require' /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:6:in
rescue in <top (required)>' /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:2:in<top (required)>' /home/myName/Desktop/rails_projects/first_app/config/application.rb:7:in
<top (required)>' /home/myName/Desktop/rails_projects/first_app/Rakefile:5:in<top (required)>' /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/rake-12.2.1/exe/rake:27:in
<top (required)>'Caused by: LoadError: cannot load such file -- sqlite3/2.3/sqlite3_native /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:4:in
require' /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:4:in
<top (required)>' /home/myName/Desktop/rails_projects/first_app/config/application.rb:7:in<top (required)>' /home/myName/Desktop/rails_projects/first_app/Rakefile:5:in
<top (required)>' /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/rake-12.2.1/exe/rake:27:in `<top (required)>' (See full trace by running task with --trace)
据我了解,我认为我的 sqlite3 已损坏,因为我确保安装了 sqlite3(“gem 列表” returns 我是 gem 的列表安装了 s 并安装了 sqlite 1.3.5)。
因此我尝试重新安装 sqlite3 1.3.5 但没有成功。我对如何解决这个问题感到困惑,非常感谢任何帮助!
谢谢!
我以某种方式修复了它。
我不太确定它为什么起作用,但它似乎在 re-installing 捆绑器之后起作用。
gem uninstall bundler
gem install bundler