Topic: Error while installing sqlite

Hej,

Ive got problems installing sqlite, when I run bundle install I get:

Installing sqlite3-ruby (1.2.4) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        E:/Programme/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb 
checking for fdatasync() in -lrt... no
checking for sqlite3.h... no

make
make: *** No rule to make target `ruby.h', needed by `sqlite3_api_wrap.o'.  Stop.


Gem files will remain installed in E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.4 for inspection.
Results logged to E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.4/ext/sqlite3_api/gem_make.out
An error occured while installing sqlite3-ruby (1.2.4), and Bundler cannot continue.
Make sure that `gem install sqlite3-ruby -v '1.2.4'` succeeds before bundling.

When I create a new Project it works with sqlite, but I downloaded another one (https://github.com/bennibu/foodsoft) and there RubyMine tells me, that some gems are missing:

[rake --tasks] E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/spec_set.rb:88:in `block in materialize': Could not find sqlite3-ruby-1.2.4 in any of the sources (Bundler::GemNotFound)
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/spec_set.rb:82:in `map!'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/spec_set.rb:82:in `materialize'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:107:in `specs'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:152:in `specs_for'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:141:in `requested_specs'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/environment.rb:23:in `requested_specs'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:11:in `setup'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler.rb:110:in `setup'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/setup.rb:17:in `<top (required)>'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'


[rake --prereqs] E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/spec_set.rb:88:in `block in materialize': Could not find sqlite3-ruby-1.2.4 in any of the sources (Bundler::GemNotFound)
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/spec_set.rb:82:in `map!'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/spec_set.rb:82:in `materialize'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:107:in `specs'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:152:in `specs_for'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:141:in `requested_specs'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/environment.rb:23:in `requested_specs'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:11:in `setup'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler.rb:110:in `setup'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/setup.rb:17:in `<top (required)>'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
  from E:/Programme/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

and when I try to run

'rake db:create'

as told in the redmefile of the software, I get

'rake aborted. Bundler couldnt find some gems.'


What can I do? Eh, by the way, Iam a completely newbie in rails :)



---------------------------------

eh and another thing is that the foodsoftprogrammer tells in the readme file:

(6) Try it out!
---------------  
Start the WEBrick server to try it out:
  
  script/server

   

what does this mean? 'rails s' doesnt work, but how can I start the server then? the file script/server contains:

#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/server'

Last edited by Jeffrie (2012-08-15 18:39:47)

Re: Error while installing sqlite

It seems that you are on a Windows PC. In this case to be able to install some gems that need compilation, you should install DevKit as explained here: http://rubyinstaller.org/add-ons/devkit/.

Second, there is LOT of docs and tutorials on RoR, start from this one:

http://guides.rubyonrails.org/

and

consult API documentation if needed: http://api.rubyonrails.org/

Hope this helps.

Last edited by Javix (2012-08-16 03:00:58)

Re: Error while installing sqlite

Hi,

thx for reply. yes Iam already working with this guide on ror.org and used that lot of other tutorials too smile

I checked the troubleshooting page on rubyinstaller.org and found exactly my problem:

https://github.com/oneclick/rubyinstall … ec_autorun

But it didnt help me. Scenario A as written there didnt fit to me and in scenario B I found an autorun in the hklm and deleted it, but its still not working.

I cant understand why my testproject is working with sqlite but this downloaded one says that sqlite is missing?!