copiousfreetime / amalgalite

SQLite database engine embedded in a ruby extension.
Other
97 stars 20 forks source link

no such file to load -- amalgalite/amalgalite (LoadError) #29

Closed mbaglay closed 8 years ago

mbaglay commented 9 years ago

internal:lib/rubygems/custom_require:29:in require': no such file to load -- amalgalite/amalgalite (LoadError) from <internal:lib/rubygems/custom_require>:29:inrequire' from /home/mbaglay/.rvm/gems/ruby-2.2.0/gems/amalgalite-1.4.1/lib/amalgalite.rb:27:in rescue in <top (required)>' from /home/mbaglay/.rvm/gems/ruby-2.2.0/gems/amalgalite-1.4.1/lib/amalgalite.rb:22:in<top (required)>' from internal:lib/rubygems/custom_require:33:in require' from <internal:lib/rubygems/custom_require>:33:inrescue in require' from internal:lib/rubygems/custom_require:29:in `require'

Ruby 1.9.3. Problem is reproduced with all version of amalgalite.

copiousfreetime commented 9 years ago

@mbaglay Can you tell me more about your environment? To me it looks like amalgalite failed to install correctly.

Can you add to this issue the output of gem env and ruby -rpp -e "pp RbConfig::CONFIG" ?

mbaglay commented 9 years ago

$ gem env RubyGems Environment:

$ ruby -rpp -e "pp RbConfig::CONFIG" {"DESTDIR"=>"", "MAJOR"=>"1", "MINOR"=>"9", "TEENY"=>"1", "PATCHLEVEL"=>"551", "INSTALL"=>"/usr/bin/install -c", "EXEEXT"=>"", "prefix"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551", "ruby_install_name"=>"ruby", "RUBY_INSTALL_NAME"=>"ruby", "RUBY_SO_NAME"=>"ruby", "exec"=>"exec", "ruby_pc"=>"ruby-1.9.pc", "PACKAGE"=>"ruby", "BUILTIN_TRANSSRCS"=>" newline.c", "USE_RUBYGEMS"=>"YES", "MANTYPE"=>"doc", "NROFF"=>"/usr/bin/nroff", "vendorhdrdir"=> "/home/mbaglay/.rbenv/versions/1.9.3-p551/include/ruby-1.9.1/vendor_ruby", "sitehdrdir"=> "/home/mbaglay/.rbenv/versions/1.9.3-p551/include/ruby-1.9.1/site_ruby", "rubyhdrdir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/include/ruby-1.9.1", "UNIVERSAL_INTS"=>"", "UNIVERSAL_ARCHNAMES"=>"", "configure_args"=> " '--prefix=/home/mbaglay/.rbenv/versions/1.9.3-p551' 'LDFLAGS=-L/home/mbaglay/.rbenv/versions/1.9.3-p551/lib ' 'CPPFLAGS=-I/home/mbaglay/.rbenv/versions/1.9.3-p551/include '", "vendordir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/lib/ruby/vendor_ruby", "sitedir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/lib/ruby/site_ruby", "ruby_version"=>"1.9.1", "sitearch"=>"x86_64-linux", "arch"=>"x86_64-linux", "RI_BASE_NAME"=>"ri", "ridir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/share/ri", "rubylibprefix"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/lib/ruby", "MAKEFILES"=>"Makefile", "PLATFORM_DIR"=>"", "THREAD_MODEL"=>"pthread", "SYMBOL_PREFIX"=>"", "EXPORT_PREFIX"=>"", "COMMON_HEADERS"=>"", "COMMON_MACROS"=>"", "COMMON_LIBS"=>"", "MAINLIBS"=>"", "ENABLE_SHARED"=>"no", "DLDLIBS"=>" -lc", "SOLIBS"=>"", "LIBRUBYARG_SHARED"=> "-Wl,-R -Wl,/home/mbaglay/.rbenv/versions/1.9.3-p551/lib -L/home/mbaglay/.rbenv/versions/1.9.3-p551/lib ", "LIBRUBYARG_STATIC"=> "-Wl,-R -Wl,/home/mbaglay/.rbenv/versions/1.9.3-p551/lib -L/home/mbaglay/.rbenv/versions/1.9.3-p551/lib -lruby-static", "LIBRUBYARG"=> "-Wl,-R -Wl,/home/mbaglay/.rbenv/versions/1.9.3-p551/lib -L/home/mbaglay/.rbenv/versions/1.9.3-p551/lib -lruby-static", "LIBRUBY"=>"libruby-static.a", "LIBRUBY_ALIASES"=>"libruby.so", "LIBRUBY_SO"=>"libruby.so.1.9.1", "LIBRUBY_A"=>"libruby-static.a", "RUBYW_INSTALL_NAME"=>"", "rubyw_install_name"=>"", "LIBRUBY_DLDFLAGS"=>"", "LIBRUBY_LDSHARED"=>"gcc -shared", "EXTDLDFLAGS"=>"", "warnflags"=> "-Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration", "debugflags"=>"-ggdb", "optflags"=>"-O3", "cxxflags"=> " -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration", "cflags"=> " -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration", "cppflags"=>"-I/home/mbaglay/.rbenv/versions/1.9.3-p551/include ", "NULLCMD"=>":", "INSTALLDOC"=>"all", "CAPITARGET"=>"nodoc", "RDOCTARGET"=>"rdoc", "EXECUTABLE_EXTS"=>"", "ARCHFILE"=>"", "LIBRUBY_RELATIVE"=>"no", "EXTOUT"=>".ext", "PREP"=>"miniruby", "TEST_RUNNABLE"=>"yes", "setup"=>"Setup", "EXTSTATIC"=>"", "STRIP"=>"strip -S -x", "TRY_LINK"=>"", "LIBPATHENV"=>"LD_LIBRARY_PATH", "RPATHFLAG"=>" -Wl,-R%1$-s", "LIBPATHFLAG"=>" -L%1$-s", "LINK_SO"=>"", "LIBEXT"=>"a", "DLEXT2"=>"", "DLEXT"=>"so", "LDSHAREDXX"=>"g++ -shared", "LDSHARED"=>"gcc -shared", "CCDLFLAGS"=>"-fPIC", "STATIC"=>"", "ARCH_FLAG"=>"", "DLDFLAGS"=>"", "ALLOCA"=>"", "codesign"=>"", "POSTLINK"=>":", "WERRORFLAG"=>"-Werror", "CHDIR"=>"cd -P", "RMALL"=>"rm -fr", "RMDIRS"=>"rmdir --ignore-fail-on-non-empty -p", "RMDIR"=>"rmdir --ignore-fail-on-non-empty", "CP"=>"cp", "RM"=>"rm -f", "PKG_CONFIG"=>"pkg-config", "DOXYGEN"=>"", "DOT"=>"", "MAKEDIRS"=>"/bin/mkdir -p", "MKDIR_P"=>"/bin/mkdir -p", "INSTALL_DATA"=>"/usr/bin/install -c -m 644", "INSTALL_SCRIPT"=>"/usr/bin/install -c", "INSTALL_PROGRAM"=>"/usr/bin/install -c", "SET_MAKE"=>"", "LN_S"=>"ln -s", "NM"=>"nm", "DLLWRAP"=>"", "WINDRES"=>"", "OBJCOPY"=>":", "OBJDUMP"=>"objdump", "ASFLAGS"=>"", "AS"=>"as", "AR"=>"ar", "RANLIB"=>"ranlib", "try_header"=>"", "COUTFLAG"=>"-o ", "OUTFLAG"=>"-o ", "CPPOUTFILE"=>"-o conftest.i", "GNU_LD"=>"yes", "GCC"=>"yes", "EGREP"=>"/bin/grep -E", "GREP"=>"/bin/grep", "CPP"=>"gcc -E", "CXXFLAGS"=> " -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration", "CXX"=>"g++", "OBJEXT"=>"o", "CPPFLAGS"=> "-I/home/mbaglay/.rbenv/versions/1.9.3-p551/include -I/home/mbaglay/.rbenv/versions/1.9.3-p551/include ", "LDFLAGS"=> "-L. -L/home/mbaglay/.rbenv/versions/1.9.3-p551/lib -rdynamic -Wl,-export-dynamic", "CFLAGS"=> " -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration", "CC"=>"gcc", "target_os"=>"linux", "target_vendor"=>"unknown", "target_cpu"=>"x86_64", "target"=>"x86_64-unknown-linux-gnu", "host_os"=>"linux-gnu", "host_vendor"=>"unknown", "host_cpu"=>"x86_64", "host"=>"x86_64-unknown-linux-gnu", "RUBYW_BASE_NAME"=>"rubyw", "RUBY_BASE_NAME"=>"ruby", "build_os"=>"linux-gnu", "build_vendor"=>"unknown", "build_cpu"=>"x86_64", "build"=>"x86_64-unknown-linux-gnu", "RUBY_RELEASE_DATE"=>"2014-11-13", "RUBY_PROGRAM_VERSION"=>"1.9.3", "BASERUBY"=>"ruby", "target_alias"=>"", "host_alias"=>"", "build_alias"=>"", "LIBS"=>"-lpthread -lrt -ldl -lcrypt -lm ", "ECHO_T"=>"", "ECHO_N"=>"-n", "ECHO_C"=>"", "DEFS"=>"", "mandir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/share/man", "localedir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/share/locale", "libdir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/lib", "psdir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/share/doc/ruby", "pdfdir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/share/doc/ruby", "dvidir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/share/doc/ruby", "htmldir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/share/doc/ruby", "infodir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/share/info", "docdir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/share/doc/ruby", "oldincludedir"=>"/usr/include", "includedir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/include", "localstatedir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/var", "sharedstatedir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/com", "sysconfdir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/etc", "datadir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/share", "datarootdir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/share", "libexecdir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/libexec", "sbindir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/sbin", "bindir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/bin", "exec_prefix"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551", "PACKAGE_URL"=>"", "PACKAGE_BUGREPORT"=>"", "PACKAGE_STRING"=>"", "PACKAGE_VERSION"=>"", "PACKAGE_TARNAME"=>"", "PACKAGE_NAME"=>"", "PATH_SEPARATOR"=>":", "SHELL"=>"/bin/bash", "rubylibdir"=>"/home/mbaglay/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1", "archdir"=> "/home/mbaglay/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-linux", "sitelibdir"=> "/home/mbaglay/.rbenv/versions/1.9.3-p551/lib/ruby/site_ruby/1.9.1", "sitearchdir"=> "/home/mbaglay/.rbenv/versions/1.9.3-p551/lib/ruby/site_ruby/1.9.1/x86_64-linux", "vendorlibdir"=> "/home/mbaglay/.rbenv/versions/1.9.3-p551/lib/ruby/vendor_ruby/1.9.1", "vendorarchdir"=> "/home/mbaglay/.rbenv/versions/1.9.3-p551/lib/ruby/vendor_ruby/1.9.1/x86_64-linux", "topdir"=> "/home/mbaglay/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-linux"}

Actually, I cannot see amalgalite/amalgalite.rb file in this gem repo.

copiousfreetime commented 9 years ago

@mbaglay There is no amalgalite/amalgalite.rb file. The file that failed to load would be the binary library that should be installed at /home/mbaglay/.rvm/gems/ruby-2.2.0/gems/amalgalite-1.4.1/lib/amalgalite/amalgalite.so.

I do find something odd about your setup. You are using ruby 1.9 and your gems are being installed in a ruby-2.2.0 directory.

In any case, I think the easiest thing to do is have you try and reinstall amalgalite with gem install -V amalgalite. That will spit out the extension build information and we can probably go from there.

copiousfreetime commented 8 years ago

closing as its old. If someone has a bug like this in the future, please open.