0

Few days ago I've started my rails adventure with tutorials, today I wanted to make my frist twitterlike app but that's what I've faced. I was trying to solve it by myself,google it,etc and couldnt find soultion, that's why im posting here.

jcob@jcob-ub:~/environment/toy_app$ rails generate scaffold User name:string email:string

Bundler::GemNotFound: Could not find sqlite3-1.3.13 in any of the sources
      block in materialize at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/bundler-1.16.1/lib/bundler/spec_set.rb:88
                      map! at org/jruby/RubyArray.java:2518
               materialize at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/bundler-1.16.1/lib/bundler/spec_set.rb:82
                     specs at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/bundler-1.16.1/lib/bundler/definition.rb:170
                 specs_for at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/bundler-1.16.1/lib/bundler/definition.rb:237
           requested_specs at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/bundler-1.16.1/lib/bundler/definition.rb:226
  block in requested_specs at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:108
                     setup at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:20
                     setup at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/bundler-1.16.1/lib/bundler.rb:107
                    <main> at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/bundler-1.16.1/lib/bundler/setup.rb:20
                   require at org/jruby/RubyKernel.java:955
                   require at /home/jcob/.rvm/rubies/jruby-9.1.13.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
           <module:(root)> at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/spring-2.0.2/lib/spring/commands.rb:1
                    <main> at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/spring-2.0.2/lib/spring/commands.rb:33
                   require at org/jruby/RubyKernel.java:955
                   require at /home/jcob/.rvm/rubies/jruby-9.1.13.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
                    <main> at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/spring-2.0.2/lib/spring/commands.rb:4
                   require at org/jruby/RubyKernel.java:955
                   require at /home/jcob/.rvm/rubies/jruby-9.1.13.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
                    (root) at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/spring-2.0.2/lib/spring/server.rb:1
                    (root) at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/spring-2.0.2/lib/spring/server.rb:9
                    (root) at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/spring-2.0.2/lib/spring/client/server.rb:1
                    <main> at /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/spring-2.0.2/bin/spring:49

bundle update

jcob@jcob-ub:~/environment/toy_app$ bundle update
Ignoring executable-hooks-1.4.2 because its extensions are not built.  Try: gem pristine executable-hooks --version 1.4.2
Ignoring gem-wrappers-1.4.0 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.4.0
Ignoring jruby-launcher-1.1.4-java because its extensions are not built.  Try: gem pristine jruby-launcher --version 1.1.4
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.......
Error loading RubyGems plugin "/home/jcob/.rvm/gems/jruby-9.1.13.0@global/gems/executable-hooks-1.4.2/lib/rubygems_plugin.rb": cannot load such file -- executable-hooks/wrapper (LoadError)
Error loading RubyGems plugin "/home/jcob/.rvm/gems/jruby-9.1.13.0@global/gems/gem-wrappers-1.4.0/lib/rubygems_plugin.rb": cannot load such file -- gem-wrappers (LoadError)
Using rake 12.3.1
Using concurrent-ruby 1.0.5
Using i18n 0.9.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.1.4
Using builder 3.2.3
Using erubi 1.7.1
Using mini_portile2 2.3.0
Using nokogiri 1.8.2
Using rails-dom-testing 2.0.3
Using crass 1.0.4
Using loofah 2.2.2
Using rails-html-sanitizer 1.0.4
Using actionview 5.1.4
Using rack 2.0.4
Using rack-test 1.0.0
Using actionpack 5.1.4
Using nio4r 2.3.0
Using websocket-extensions 0.1.3
Using websocket-driver 0.6.5
Using actioncable 5.1.4
Using globalid 0.4.1
Using activejob 5.1.4
Using mini_mime 1.0.0
Using mail 2.7.0
Using actionmailer 5.1.4
Using activemodel 5.1.4
Using arel 8.0.0
Using activerecord 5.1.4
Using bindex 0.5.0
Using bundler 1.16.1
Using byebug 9.0.6
Using coffee-script-source 1.12.2
Using execjs 2.7.0
Using coffee-script 2.4.1
Using method_source 0.9.0
Using thor 0.20.0
Using railties 5.1.4
Using coffee-rails 4.2.2
Using ffi 1.9.23
Using multi_json 1.13.1
Using jbuilder 2.7.0
Using jquery-rails 4.3.1
Using rb-fsevent 0.10.3
Using rb-inotify 0.9.10
Using ruby_dep 1.5.0
Using listen 3.1.5
Using puma 3.9.1
Using sprockets 3.7.1
Using sprockets-rails 3.2.1
Using rails 5.1.4
Using sass-listen 4.0.0
Using sass 3.5.6
Using tilt 2.0.8
Using sass-rails 5.0.6
Using spring 2.0.2
Using spring-watcher-listen 2.0.1
Using sqlite3 1.3.13
Using turbolinks-source 5.1.0
Using turbolinks 5.0.1
Using uglifier 3.2.0
Using web-console 3.5.1
Bundle updated!
Gems in the group production were not installed.

Here's my gemfile

source 'https://rubygems.org'

gem 'rails',        '5.1.4'
gem 'puma',         '3.9.1'
gem 'sass-rails',   '5.0.6'
gem 'uglifier',     '3.2.0'
gem 'coffee-rails', '4.2.2'
gem 'jquery-rails', '4.3.1'
gem 'turbolinks',   '5.0.1'
gem 'jbuilder',     '2.7.0'

group :development, :test do
  gem 'sqlite3', '1.3.13'
  gem 'byebug',  '9.0.6', platform: :mri
end

group :development do
  gem 'web-console',           '3.5.1'
  gem 'listen',                '3.1.5'
  gem 'spring',                '2.0.2'
  gem 'spring-watcher-listen', '2.0.1'
end

group :production do
  gem 'pg', '0.20.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

@edit what happens after trying to reinstall sqlite3

jcob@jcob-ub:~/environment/toy_app$  gem install sqlite3Ignoring byebug-9.0.6 because its extensions are not built. Try: gem pristine byebug --version 9.0.6
Building native extensions. This could take a while...
ERROR:  Error installing sqlite3:
    ERROR: Failed to build gem native extension.

    current directory: /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/sqlite3-1.3.13/ext/sqlite3
/home/jcob/.rvm/rubies/jruby-9.1.13.0/bin/jruby -r ./siteconf20180422-6280-1sxfr6j.rb extconf.rb
RuntimeError: The compiler failed to generate an executable file.
You have to install development tools first.

       try_do at /home/jcob/.rvm/rubies/jruby-9.1.13.0/lib/ruby/stdlib/mkmf.rb:456
    try_link0 at /home/jcob/.rvm/rubies/jruby-9.1.13.0/lib/ruby/stdlib/mkmf.rb:541
     try_link at /home/jcob/.rvm/rubies/jruby-9.1.13.0/lib/ruby/stdlib/mkmf.rb:556
  try_ldflags at /home/jcob/.rvm/rubies/jruby-9.1.13.0/lib/ruby/stdlib/mkmf.rb:657
   pkg_config at /home/jcob/.rvm/rubies/jruby-9.1.13.0/lib/ruby/stdlib/mkmf.rb:1813
       <main> at extconf.rb:27
*** 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=/home/jcob/.rvm/rubies/jruby-9.1.13.0/bin/jruby
    --with-sqlite3-config
    --without-sqlite3-config
    --with-pkg-config
    --without-pkg-config

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/jcob/.rvm/gems/jruby-9.1.13.0/extensions/universal-java-1.8/2.3.0/sqlite3-1.3.13/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/sqlite3-1.3.13 for inspection.
Results logged to /home/jcob/.rvm/gems/jruby-9.1.13.0/extensions/universal-java-1.8/2.3.0/sqlite3-1.3.13/gem_make.out

gem pristine byebug --version 9.0.6

Ignoring byebug-9.0.6 because its extensions are not built. Try: gem pristine byebug --version 9.0.6
Restoring gems to pristine condition...
Building native extensions. This could take a while...
ERROR:  While executing gem ... (Gem::Ext::BuildError)
    ERROR: Failed to build gem native extension.

    current directory: /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/byebug-9.0.6/ext/byebug
/home/jcob/.rvm/rubies/jruby-9.1.13.0/bin/jruby -r ./siteconf20180424-28122-l2jsg6.rb extconf.rb
creating Makefile

current directory: /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/byebug-9.0.6/ext/byebug
make "DESTDIR=" clean

current directory: /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/byebug-9.0.6/ext/byebug
make "DESTDIR="
make: *** No rule to make target '/home/jcob/.rvm/rubies/jruby-9.1.13.0/lib/ruby/include/ruby/ruby.h', needed by 'locker.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in /home/jcob/.rvm/gems/jruby-9.1.13.0/gems/byebug-9.0.6 for inspection.
Results logged to /home/jcob/.rvm/gems/jruby-9.1.13.0/extensions/universal-java-1.8/2.3.0/byebug-9.0.6/gem_make.out
zabsko
  • 1
  • 2
  • Try removing the Gemfile.lock file and running bundle again `rm -rf Gemfile.lock && bundle`, or removing any sqlite gem and instaling again `gem uninstall sqlite && gem install sqlite`. – Sebastián Palma Apr 22 '18 at 14:51
  • @SebastianPalma I've uninstalled sqlite3 gem but cant install it again. https://pastebin.com/Ed3RVikP It says something about installing dev tools(already installed JDK) – zabsko Apr 22 '18 at 15:03
  • Private pastebin, whatever you need to show, add it to the question. – Sebastián Palma Apr 22 '18 at 15:08
  • @SebastianPalma check it now :) – zabsko Apr 22 '18 at 18:45
  • the error contains this: `Try: gem pristine byebug --version 9.0.6` what happened when you tried `gem pristine byebug --version 9.0.6` ? :) – Taryn East Apr 23 '18 at 00:31
  • Also note that the `extconf` error is pretty common and usually means you've got to install some dev header files... (independent of your ruby install) what OS are you on? can you have a look at some of the answers for this and see if they apply? https://stackoverflow.com/questions/19697359/ruby-debug-could-not-create-makefile-due-to-some-reason-probably-lack-of-necess – Taryn East Apr 23 '18 at 00:33
  • @TarynEast already posted what happens after gem pristine byebug. I'm on ubuntu 16.04, yes i've checked those answers which you linked and nothing helped. Still same issue. – zabsko Apr 24 '18 at 10:45
  • What happens if you just remove byebug for now and see if sqlite works or not... it's probably a completely separate issue. – Taryn East Apr 25 '18 at 23:14

0 Answers0