Getting the Ruby on Rails workspace and installing sqlite3

Trying to upgrade to the latest version of Ruby on Rails. I have a ruby ​​and the rails are installed fine (I think).

C:\Users\benjaminw>ruby --version ruby 2.0.0p0 (2013-02-24) [x64-mingw32] C:\Users\benjaminw>rails -v Rails 3.2.13 

I follow the instructions in the Ruby on Rails book, but a little outdated. The next step says to load sqlite3 db and extract the files to the following folder C: / Ruby200 / bin

Then run the following command to make sure db was installed correctly

 C:\Users\benjaminw>sqlite3 --version 3.7.16 2013-03-18 11:39:23 66d5f2b76750f3520eb7a495f6247206758f5b90 

This is where the problem arises. When I enter the following command, I get an ERROR, and it seems important to set up the environment correctly. Does anyone know what the following means and how to fix it? Oh, and I installed this version of devkit on my Windows 7 computer DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe.

 C:\Users\benjaminw>gem install sqlite3-ruby Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. C:/Ruby200/bin/ruby.exe extconf.rb checking for sqlite3.h... no sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first. *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/Ruby200/bin/ruby --with-sqlite3-dir --without-sqlite3-dir --with-sqlite3-include --without-sqlite3-include=${sqlite3-dir}/include --with-sqlite3-lib --without-sqlite3-lib=${sqlite3-dir}/ --enable-local --disable-local Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/sqlite3-1 .3.7 for inspection. Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/ext/sqlite3/ gem_make.out 
+3
source share
5 answers

I absolutely had no problems with Ruby 2.0 and SQLite as a result of compiling SQLITE.h

Decision

Go to the following URL so that this problem is rejected by someone who has taken the next step in assembling the gem over the precompiled gemstones for other Rails 4 Rubyists who want to use Windows: this link .

Using a command like -with-opt-dir=<Path of Sqlite.3 bin, lib, include, and share folders> . The only difficult part was the files that the sqlite3 official site provides, precompiled, which can be very difficult to consider a problem.

I can give you further instructions if you still have problems performing such actions using Ruby 2.0 and Rails 4.0.0.0beta1.

Using Ruby 2.0 with Windows should now be fine for you with respect to Sqlite3 and Rails. Pay attention to avoid using 64-bit Ruby 2.0 when it comes to Rails 4.0.0beta1, because one of the dependent stones for Rails 4 incorrectly indicates that your computer’s processor is incompatible with its gem requirements; it will be resolved soon.

Edit: Noticed that I was not as useful as I should have more explicit instructions; We have provided you with a link to those who have already managed to do this, and the files needed to run and run.

@Brian Petro: Actually, solving this problem is easy if you know how Gems and .h files at the end of the day sometimes work with construction. The problem is how some gems are processed using Ruby 2.0; starting with Ruby 2.0, precompiled gems that were convenient for previous versions of Ruby will not work if they have ABI Breakage; Sqlite3 gem is one of them:

+2
source

Running rails in a lousy environment will make you a big headache. Dependencies will conflict with your only ruby ​​version and make you think about reinstalling your OS.

It looks like you are using Windows. I installed rails 3.2 on a new computer with Windows 8. After several days of working with configuration files randomly on a Windows file system, I grabbed an old laptop installed on Ubuntu OS (just because UEFI prevented me from formatting windows 8 and installing ubuntu).

Do yourself a favor! Get the installation of Ubuntu. This makes learning Ruby and Rails easier because files don't get cluttered through clutter in Windows folders.

To finish, learn about RVM or RBENV. They will improve your life by simplifying installation and version replacement. There are other benefits that are simply off topic.

RVM Install <- A personal choice, but I have not tried RBEnv.

RBEnv on github

Installing Rails the first few times is a headache. If you install one of the above options, we hope that this will be only one headache.

+1
source

You saw this topic in the goyinstaller google group, New Knapsack package: sqlite (experimental) , you can use the new package and install the gem.

I can successfully install the gem, you can refer to the following section:

SQLite3 Ruby 2.0 on Windows

My environment:

  • OS: win 7 64bit
  • Ruby: ruby ​​2.0.0p247 (2013-06-27) [i386-mingw32]
  • Gem: 2.0.5
+1
source

Have you tried http://railsinstaller.org/ ? From their site: “RailsInstaller has everything you need to get back to its original state. In one easy-to-use installer, you get all the common packages needed for the full Rails stack. Download it now and write (and run) the Rails code in a flash.” It looks like it includes sqlite.

0
source

This link will help.

Install libsqlite3-dev first , then try sqlite3 with gem .

Use package manager for libsqlite3-dev

and

 sudo gem install sqlite3 
0
source

All Articles