I work on windows, have rails 3.2.12(just upgraded) and ruby 2.0.0p0. when i try to delete a controller i get this error:
F:\my apps\meshworks-redo> rails d controller Plans
C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/pg-0.14.1-x86-mingw32/lib/pg.rb:10:in `require': cannot load such file -- 2.0/pg_ext (LoadError)
from C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/pg-0.14.1-x86-mingw32/lib/pg.rb:10:in `rescue in <top (required)>'
from C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/pg-0.14.1-x86-mingw32/lib/pg.rb:3:in `<top (required)>'
from C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/bundler-1.3.2/lib/bundler/runtime.rb:72:in `require'
from C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/bundler-1.3.2/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/bundler-1.3.2/lib/bundler/runtime.rb:70:in `each'
from C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/bundler-1.3.2/lib/bundler/runtime.rb:70:in `block in require'
from C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/bundler-1.3.2/lib/bundler/runtime.rb:59:in `each'
from C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/bundler-1.3.2/lib/bundler/runtime.rb:59:in `require'
from C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/bundler-1.3.2/lib/bundler.rb:132:in `require'
from F:/my apps/meshworks-redo/config/application.rb:7:in `<top (required)>'
from C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/railties-3.2.12/lib/rails/commands.rb:24:in `require'
from C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/railties-3.2.12/lib/rails/commands.rb:24:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I tried re installing the pg gem, no luck.
A friend of mine got the same problem when using Ruby 2.0 on Windows 7 with Postgres. It occurs not only when trying to destroy a controller, but for every database action (including rake db:create). The problem is that the pg_ext.so file is not included for ruby 2.0. It is included for 1.9, but simply copying this to the 2.0 does not seem work. However, I found another method to obtain the correct pg_ext.so. Not exactly sure why this works, but it works for him. Here is what you need to do:
Go to the folder where 2.0/pg_ext.so (the file that could not be found) should be located. In your case C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/pg-0.14.1-x86-mingw32/lib/.
Create a folder called '2.0' (without the quotes) here.
In this folder you will need the correct pg_ext.so file. You can obtain this in the following way:
Manually install the pg gem ("gem install pg" in console). This installs the non x86-mingw32 version of the gem. It does not fix the problem, but it does create the correct pg_ext.so. I think this is because it compiles the pg gem for your system, so for ruby 2.0. You can then use this pg_ext.so file with the pg x86-mingw32 version. You will need DevKit in order to compile and install pg (http://rubyinstaller.org/add-ons/devkit/).
Go to the location of pg_ext.so in the pg-0.14.1 gem folder. In your case this would be C:/Users/rrw/.pik/rubies/Ruby-200-p0/lib/ruby/gems/2.0.0/gems/pg-0.14.1/lib.
Copy the file pg_ext.so from this folder to the newly pg-0.14.1-x86-mingw32/lib/2.0/ folder in step 2.
Now retry your commands and check if everything works. If it does not, delete your Gemfile.lock and re-run bundle install.
The same problem with this gem might occur with other mingw32 gems as well. IFor example, I had the same problem with the bcrypt-rails gem. Following the same steps as described above fixed the problem. I am now successfully running Ruby 2.0 on Windows 7.
Ps. If you have any other problems running the pg gem on Windows 7 64 bit, then try to install the 32 bit x86 version of Ruby (the RubyInstaller) and postgresql. Furthermore, make sure you include the Ruby folders in your path (this is an option while installing ruby 2.0 using the RubyInstaller) as well as the Postgresql lib and bin folders.
Good luck!
Related
I have ruby on rails installed and something kinda went fubar on it. When I try to generate a controller, I get the following:
➜ librius rails generate controller Teachers
Running via Spring preloader in process 27015
/Users/erick/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `load': no implicit conversion of nil into String (TypeError)
from /Users/erick/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `block in load'
from /Users/erick/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/erick/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `load'
from /Users/erick/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/erick/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
➜ librius
I've tried to uninstall/reinstall using gem and RVM but nothing seems to work.
Thanks.
The comments helped point in the right direction.
I did a gem upgrade (which I had to download because it kept telling me I had the latest). Then I did gem pristine --all, then spring stop. (Still wasn't working.) Then lastly, bundle install and voila! Such a hassle! Thanks!
Ruby 2.1.3p242 <2014-09-19 revision 47630> [x64-mingw32]
Rails 4.2.0.beta2
I'm running windows 8 on a 64 bit system. I have been using c9 (cloud hosted ubuntu) but want to start using RubyMine IDE on my pc to make everything faster but it's posing some problems.
I've tried pretty much every recommended way including this one:
How do I install sqlite3 for Ruby on Windows?
but I'm still getting the same error message. You help is much appreciated! Please let me know if you have any questions for me.
Full Error message when I run $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 <top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
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'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler.rb:133:in `require'
from C:/Sites/aynulhabib-habib-framework-aca42deddccd/config/application.rb:7:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta2/lib/rails/commands.rb:17:in `<top (required)>'
from C:/Sites/aynulhabib-habib-framework-aca42deddccd/bin/rails:8:in `require'
from C:/Sites/aynulhabib-habib-framework-aca42deddccd/bin/rails:8:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
fortunately, you don't have to switch to ruby 2.0
there is a solution to this issue, after endless trying...
https://github.com/hwding/sqlite3-ruby-win
Steps
Pre
gem uninstall sqlite3 --all
Source
Download the latest sqlite3-ruby, https://github.com/sparklemotion/sqlite3-ruby
unzip the package
Build
run command-line in the extracted dir
make sure you have your C compiler installed and added to PATH
gem install bundler
bundle install
rake native gem
you'll find a dir named 'pkg' generated
Install
enter dir 'pkg'
gem install --local sqlite3-xxx.gem ('xxx' is version code)
Check
irb
require 'sqlite3'
The issue is that binary sqlite3 gem do not include pre-compiled versions for Ruby 2.1.3
This is mentioned in the sqlite3-ruby mailing list here.
In the folder of your project open terminal and execute:
bundle update sqlite3
bundle update nokogiri
I hope i have helped you ;)
EDIT:
i always recommend using linux/mac for ruby, because some gems may get problematic, because of compiling errors with c
always use bundle to manage your gems, it is much easier*,
you can install it by:
gem install bundler
bundle install - will install all the gems in your Gemfile
the last bundler version is not compatible withe ruby bellow 2.3, so use gem install bundler -v 1.16.4
If you have extracted "exe"s and "dll"s from Sqlite download link to Ruby's bin folder and still have this problem. Try this:
bundle update
gem uninstall sqlite3
Given a choice between multiple versions of sqlite3, choose last option 'All versions'. Enter last number here
Select gem to uninstall:
1. sqlite3-1.3.13
2. sqlite3-1.3.13-x64-mingw32
3. All versions
>3
.
.
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]
>
y
gem install sqlite3 --platform=ruby
rails s
This should work.
Read through this link for more explanation if above works for you.
Heyo. I apologize in advance if this question has been answered in another thread. I've searched through the site but I didn't find an answer. However, the closest related issue was Ruby on Rails / PostgreSQL - Library not Loaded error when starting server- libq.5.dylib, but it was never resolved, and the answer doesn't help me.
I'm trying to get PostgreSQL running on my Mac OSX 10.6.8. I already have Ruby 1.9.3p392 and Rails 3.2.13 installed.
Since I've 10.6.8, and PostGresApp requires 10.7+, I tried installing PG using the manual installer (v9.2.3) available here: http://www.enterprisedb.com/products-services-training/pgdownload
I first installed it to its default path at: /Library/PostgreSQL/9.2/. I then installed the pg gem (PATH=$PATH:/Library/PostgreSQL/9.2/bin sudo gem install pg). When I tried rails s to launch my localhost, I got the error below.
After some reading, I guessed it might be a path error, so I removed the pg gem, and then used the postgresql uninstaller. I then reinstalled pg in /users/stewartmccoy/Library/PostgreSQL/9.2/...and then reinstalled the pg gem. But I still get the same error.
Any thoughts on how I might correctly install PostgreSQL and get my rails server running?
stewart-mccoys-macbook:footy_subs stewartmccoy$ rails s
/Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/pg-0.14.1/lib/pg.rb:4:in `require': dlopen(/Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/pg-0.14.1/lib/pg_ext.bundle, 9): Library not loaded: libpq.5.dylib (LoadError)
Referenced from: /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/pg-0.14.1/lib/pg_ext.bundle
Reason: image not found - /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/pg-0.14.1/lib/pg_ext.bundle
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/pg-0.14.1/lib/pg.rb:4:in `<top (required)>'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
from /Users/stewartmccoy/Code/footy_subs/config/application.rb:13:in `<top (required)>'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
stewart-mccoys-macbook:footy_subs stewartmccoy$ gem uninstall pgSuccessfully uninstalled pg-0.14.1
stewart-mccoys-macbook:footy_subs stewartmccoy$ PATH=$PATH:/users/stewartmccoy/Library/PostgreSQL/9.2/bin sudo gem install pg
Password:
Fetching: pg-0.14.1.gem (100%)
Building native extensions. This could take a while...
Successfully installed pg-0.14.1
1 gem installed
Installing ri documentation for pg-0.14.1...
Installing RDoc documentation for pg-0.14.1...
stewart-mccoys-macbook:footy_subs stewartmccoy$ rails s
/Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/pg-0.14.1/lib/pg.rb:4:in `require': dlopen(/Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/pg-0.14.1/lib/pg_ext.bundle, 9): Library not loaded: libpq.5.dylib (LoadError)
Referenced from: /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/pg-0.14.1/lib/pg_ext.bundle
Reason: image not found - /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/pg-0.14.1/lib/pg_ext.bundle
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/pg-0.14.1/lib/pg.rb:4:in `<top (required)>'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
from /Users/stewartmccoy/Code/footy_subs/config/application.rb:13:in `<top (required)>'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /Users/stewartmccoy/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
The key part of the error is:
Library not loaded: libpq.5.dylib (LoadError)
This suggests that ruby can't find libpq at runtime. To address that you should probably set the DYLD_LIBRARY_PATH environment variable to point to the lib directory of your PostgreSQL install, either globally or in a wrapper script you use to start Rails. See this superuser question for some more info.
The Pg gem can find the library during compilation and installation because the pg_config executable is on the PATH and it uses that to find libpq. It appears that it doesn't store the path for use at runtime so you have to set the runtime dynamic linker up yourself.
A simple wrapper script (in case you don't want to modify your global environment) is something like:
#!/bin/bash
export DYLD_LIBRARY_PATH=/path/to/pg/lib
exec rails "$#"
The "$#" basically means "pass all arguments to this script through as if they were passed here directly". It preserves quoting correctly and essentially means that the rails command can't tell you didn't run it directly.
I wanted to put my two cents here to answers above.
Sometimes it's enough to just reinstall pg gem.
gem uninstall pg && gem install pg
In my case I upgraded postgresql server from 9.6 up to 14.x and dylib paths were changed.
/opt/local/lib/postgresql96/libpq.5.dylib -> /opt/local/lib/postgresql14/libpq.5.dylib
The gem uses pg_config to determine paths to /opt/local/lib/postgresql[version] folder (named PKGLIBDIR). To build native library for the gem rake sets paths to dynamic libs by fetching them from pg_config in compile. Once pg gem is compiled the paths are linked forever. So, the reinstallation recompiles and relinks path to the new libraries.
A similar stackoverflow answer proposed removing Postgres.app from your PATH, uninstalling the pg gem, and installing the pg gem again.
(I'm not taking the time to check carefully if that applies to this problem, but it solved a problem I had and I want to spread that solution around since I had trouble finding it.)
I created a fresh project using rails new Project -d=postgresql. If I then run rails server, I get the following error message:
C:/GemRepository/gems/actionpack-3.1.3/lib/action_dispatch.rb:34:in `require': cannot load such file -- active_model (LoadError)
from C:/GemRepository/gems/actionpack-3.1.3/lib/action_dispatch.rb:34:in `<top (required)>'
from C:/GemRepository/gems/railties-3.1.3/lib/rails/commands/server.rb:3:in `require'
from C:/GemRepository/gems/railties-3.1.3/lib/rails/commands/server.rb:3:in `<top (required)>'
from C:/GemRepository/gems/railties-3.1.3/lib/rails/commands.rb:48:in `require'
from C:/GemRepository/gems/railties-3.1.3/lib/rails/commands.rb:48:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I also tried
gem which active_model
which returned
C:/GemRepository/gems/activemodel-3.1.1/lib/active_model.rb
Please help me.
Had this problem, came across this post. This fixed it for me:
rvm gemset pristine
Well, I managed to solve it.
I restarted my computer, deleted everything from my gem repository, reinstalled rubygems (ruby setup.rb) and reinstalled rails (gem install rails).
Thanks anyway :)
What version of rails is in the gem file? And have you run 'bundle install'?
I notice that Actionpack is 3.1.3 is called by the server, but the activemodel found is 3.1.1.
Run the bundle command from the project directory
I had a similar error and it was due to accidentally corrupting my Gemfile, so it is worth checking that. If it is version controlled then just git checkout Gemfile and bundle update to rebuild.
gem uninstall active-model and perfomr gem install active-model
My OS is Windows 7.
My problem is that when I try to run rails server, an error occurs. I have installed the sqlite3 gem, even the sqlite-ruby gem, and still nothing.
I already don't know what to do anymore.
If anyone needs any additional information, ask for it and I'll put it up.
The complete error is:
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.3-x86-mingw32/lib/sqlite3.rb:6:in `require': no such file to load -- sqlite3/sqlite3_native (LoadError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.3-x86-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.3-x86-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/runtime.rb:68:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/runtime.rb:66:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/runtime.rb:66:in `block in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/runtime.rb:55:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/runtime.rb:55:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler.rb:120:in `require'
from C:/Users/JorWan/Desktop/JorWan/ASCENDSTUDIO/RoR/intento2/config/application.rb:7:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/commands.rb:28:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/commands.rb:28:in `block in <top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/commands.rb:27:in `tap'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
download the required executable and the dll from http://www.sqlite.org/download.html
extract to your ruby's bin (c:\Ruby192\bin)
Forget all the so called "answers", no compiling of the sources or downloading pre-compiled libraries will solve this problem, believe me I tried everything, the problem lies somewhere else. This is how it works on windows:
bundle update sqlite3
You likely get another similar error after this one regarding nokogiri, fix it with the command:
bundle update nokogiri
Enjoy your Ruby App!
Is that file (/sqlite3/sqlite3_native) in your PATH environment variable? It will need to be in order for that gem to work. If you need to check try using echo %PATH% on the command prompt.
If it ends up that you need to add it to your path you can either SET PATH=%PATH%;C:\Path\To\Sqlite3 or change your environment variables by selecting the Properties\Advances\Environment Variables option after right-clicking on My Computer. Edit the path variable to contain your path and viola!
This URL provides the step-wise description and solution.
Hope it works for you.
http://rubyonwindowsguides.github.io/book/ch02-05.html
If you have extracted "exe"s and "dll"s from Sqlite download link to Ruby's bin folder and still have this problem. Try this:
bundle update
gem uninstall sqlite3
Given a choice between multiple versions of sqlite3, choose last option 'All versions'. Enter last number here
Select gem to uninstall:
1. sqlite3-1.3.13
2. sqlite3-1.3.13-x64-mingw32
3. All versions
>3
.
.
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]
>
y
gem install sqlite3 --platform=ruby
rails server
This should work.
Read through this link for more explanation if above works for you.