Tag: sqlite3

Windows / Ruby / Rails安装 – 。无法加载这样的文件–sqlite3 / sqlite3_native windows

Ruby 2.1.3p242 [x64-mingw32] Rails 4.2.0.beta2 我在64位系统上运行Windows 8。 我一直在使用c9(云托管的ubuntu),但是想在我的电脑上开始使用RubyMine IDE来使一切变得更快,但这会带来一些问题。 我已经尝试了几乎所有推荐的方式,包括这个: 如何在Windows上为Ruby安装sqlite3? 但我仍然收到相同的错误消息。 非常感谢您的帮助! 如果您对我有任何疑问,请与我们联系。 运行$ rails s时出现完整错误消息: C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta2/lib/active_support/dependencies.rb:248:in `require’: cannot load such file — sqlite3/sqlite3_native (LoadError) from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta2/lib/active_support/dependencies.rb:248:in `block in require’ from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta2/lib/active_support/dependencies.rb:233:in `load_dependency’ from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta2/lib/active_support/dependencies.rb:248:in `require’ from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:6:in `rescue in ‘ from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:2:in `’ from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:76:in `require’ from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:76:in `block (2 levels) in require’ […]

如何在SQLite3和Rails 3.1中打开REGEXP?

我使用SQLite3数据库在Rails 3中有以下语句: word = ‘Hello’ word_entry = Word.where(“name REGEXP :word”, {:word => “[[::]]”}) 但是,在SQLite3下运行时,我不断得到: SQLite3 :: SQLException:没有这样的函数:REGEXP 我在SQLite3文档中读到它确实支持REGEXP函数。 在我的gemfile中,我有这条线 gem ‘sqlite3’ 我的数据库配置文件如下所示: development: adapter: sqlite3 database: db/development.sqlite3 pool: 5 timeout: 5000 有什么想法正在发生什么? 解决方案:我最终找到了这个解决方案 。 不幸的是,它不适用于Rails 3.因此,为了使用正则表达式,我最终切换到MYSQL而不是SQLite3。

sqlite3 gem无法安装

我正在尝试在OS X 10.6上安装“sqlite3-ruby”gem(或“sqlite3”gem)。 我正在使用ruby-1.9.2,目前我得到以下内容: $ sqlite3 –version 3.7.4 $ sudo gem install sqlite3 Building native extensions. This could take a while… ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. /Users/folken/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb checking for sqlite3.h… *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or […]

HEROKU – 无法运行git push heroku master

我运行命令 heroku create –stack cedar git push heroku master 但它给了我一个错误: > Counting objects: 144, done. Delta compression using up to 2 threads. > Compressing objects: 100% (128/128), done. Writing objects: 100% > (144/144), 50.16 KiB, done. Total 144 (delta 23), reused 0 (delta 0) > > —–> Heroku receiving push > —–> Ruby/Rails app detected […]