Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadError cannot load such file -- standalone_migrations #144

Open
hamxashahid opened this issue Apr 26, 2018 · 8 comments
Open

LoadError cannot load such file -- standalone_migrations #144

hamxashahid opened this issue Apr 26, 2018 · 8 comments

Comments

@hamxashahid
Copy link

hamxashahid commented Apr 26, 2018

Hi !

I am also getting same issue;

Added following lines in Rakefile after installing the gem

require 'standalone_migrations'
StandaloneMigrations::Tasks.load_tasks

it gives the following error:
LoadError: cannot load such file -- standalone_migrations
/home/hshahid/Projects/claims-proxy/Rakefile:16:in require' /home/hshahid/Projects/claims-proxy/Rakefile:16:in <top (required)>'
/home/hshahid/.rvm/gems/jruby-9.1.7.0@claims-proxy/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in load' /home/hshahid/.rvm/gems/jruby-9.1.7.0@claims-proxy/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in load_rakefile'
/home/hshahid/.rvm/gems/jruby-9.1.7.0@claims-proxy/gems/rake-12.3.1/lib/rake/application.rb:703:in raw_load_rakefile' /home/hshahid/.rvm/gems/jruby-9.1.7.0@claims-proxy/gems/rake-12.3.1/lib/rake/application.rb:104:in block in load_rakefile'
/home/hshahid/.rvm/gems/jruby-9.1.7.0@claims-proxy/gems/rake-12.3.1/lib/rake/application.rb:186:in standard_exception_handling' /home/hshahid/.rvm/gems/jruby-9.1.7.0@claims-proxy/gems/rake-12.3.1/lib/rake/application.rb:103:in load_rakefile'
/home/hshahid/.rvm/gems/jruby-9.1.7.0@claims-proxy/gems/rake-12.3.1/lib/rake/application.rb:82:in block in run' /home/hshahid/.rvm/gems/jruby-9.1.7.0@claims-proxy/gems/rake-12.3.1/lib/rake/application.rb:186:in standard_exception_handling'
/home/hshahid/.rvm/gems/jruby-9.1.7.0@claims-proxy/gems/rake-12.3.1/lib/rake/application.rb:80:in run' /home/hshahid/.rvm/gems/jruby-9.1.7.0@claims-proxy/gems/rake-12.3.1/exe/rake:27:in <top (required)>'
/home/hshahid/.rvm/gems/jruby-9.1.7.0@claims-proxy/bin/rake:23:in load' /home/hshahid/.rvm/gems/jruby-9.1.7.0@claims-proxy/bin/rake:23:in

'

@hamxashahid hamxashahid changed the title cannot load such file -- standalone_migrations LoadError cannot load such file -- standalone_migrations Apr 26, 2018
@Pysis868
Copy link
Contributor

With RubyGems installed giving the gem command, and then installing this gem and adding that code, mine seems to be detected. Not sure how much JRuby changes things though. I don't use that.

@manjufy
Copy link
Contributor

manjufy commented Aug 7, 2018

I'm facing the same issue in Ubuntu 18.04

rake aborted!
LoadError: cannot load such file -- standalone_migrations
/home/manju/Codes/xxx/xxx/migrations/Rakefile:1:in `<top (required)>'
/var/lib/gems/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)

@ruanltbg
Copy link

I can say that in my local development I have the same problem running the commands inside a bundler context.

On my servers Ubuntu 14.04 I can't run in any context.

@cabello
Copy link

cabello commented Sep 27, 2019

My issue was that CI was installing a really old version of the gem 1.0.13 - September 26, 2012 (14 KB) when I used s.add_development_dependency 'standalone_migrations', the solution was to point to a newer version of the gem by using:

  s.add_development_dependency 'standalone_migrations', '~> 5'

It worked like a charm, thanks for this project 🙏 .

@VanyaNeytrino
Copy link

add gem 'standalone_migrations', '~> 5.2', '>= 5.2.7' your Gemfile and run bundle update in your console. It's work for me

@jeiman
Copy link

jeiman commented Nov 17, 2019

I am facing a similar issue to this, however, I can't seem to install the package using gem install standalone_migrations.

Error (A rather long one, so apologies for the length):

Building native extensions.  This could take a while...
^T^TERROR:  Error installing standalone_migrations:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/nokogiri-1.10.5/ext/nokogiri
/usr/bin/ruby2.3 -r ./siteconf20191118-20980-16mabwv.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.4.0
checking for gzdopen() in -lz... yes
checking for iconv... yes
************************************************************************
IMPORTANT NOTICE:

Building Nokogiri with a packaged version of libxml2-2.9.10
with the following patches applied:
        - 0001-Revert-Do-not-URI-escape-in-server-side-includes.patch
        - 0002-Remove-script-macro-support.patch
        - 0003-Update-entities-to-remove-handling-of-ssi.patch

Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:

    gem install nokogiri -- --use-system-libraries
        [--with-xml2-config=/path/to/xml2-config]
        [--with-xslt-config=/path/to/xslt-config]

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install

Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.10.tar.gz into tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.10... OK
Running git apply with /var/lib/gems/2.3.0/gems/nokogiri-1.10.5/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch... OK
Running git apply with /var/lib/gems/2.3.0/gems/nokogiri-1.10.5/patches/libxml2/0002-Remove-script-macro-support.patch... OK
Running git apply with /var/lib/gems/2.3.0/gems/nokogiri-1.10.5/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch... OK
Running 'configure' for libxml2 2.9.10... ERROR, review '/var/lib/gems/2.3.0/gems/nokogiri-1.10.5/ext/nokogiri/tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.10/configure.log' to see what happened. Last lines a
re:
========================================================================
config.status: creating doc/examples/Makefile
config.status: creating doc/devhelp/Makefile
config.status: creating example/Makefile
config.status: creating python/Makefile
config.status: creating python/tests/Makefile
config.status: creating xstc/Makefile
config.status: creating include/libxml/xmlversion.h
config.status: creating libxml-2.0.pc
config.status: creating libxml-2.0-uninstalled.pc
config.status: creating libxml2-config.cmake
config.status: creating python/setup.py
config.status: creating xml2-config
config.status: creating config.h
config.status: executing depfiles commands
config.status: error: in `/var/lib/gems/2.3.0/gems/nokogiri-1.10.5/ext/nokogiri/tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.10/libxml2-2.9.10':
config.status: error: Something went wrong bootstrapping makefile fragments
    for automatic dependency tracking.  Try re-running configure with the
    '--disable-dependency-tracking' option to at least be able to build
    the package (albeit without support for automatic dependency tracking).
See `config.log' for more details
========================================================================
*** 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=/usr/bin/$(RUBY_BASE_NAME)2.3
        --help
        --clean
        --use-system-libraries
        --enable-static
        --disable-static
        --with-zlib-dir
        --without-zlib-dir
        --with-zlib-include
        --without-zlib-include=${zlib-dir}/include
        --with-zlib-lib
        --without-zlib-lib=${zlib-dir}/lib
        --enable-cross-build
        --disable-cross-build
/var/lib/gems/2.3.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:402:in `block in execute': Failed to complete configure task (RuntimeError)
        from /var/lib/gems/2.3.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:373:in `chdir'
        from /var/lib/gems/2.3.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:373:in `execute'
        from /var/lib/gems/2.3.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:110:in `configure'
        from /var/lib/gems/2.3.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:153:in `cook'
        from extconf.rb:365:in `block (2 levels) in process_recipe'
        from extconf.rb:257:in `block in chdir_for_build'
        from extconf.rb:256:in `chdir'
        from extconf.rb:256:in `chdir_for_build'
        from extconf.rb:364:in `block in process_recipe'
        from extconf.rb:262:in `tap'
        from extconf.rb:262:in `process_recipe'
        from extconf.rb:557:in `<main>'

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

  /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.10.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/nokogiri-1.10.5 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.10.5/gem_make.out

Not sure how to go about solving this.

I would appreciate any help on this matter.

@cabello
Copy link

cabello commented Nov 18, 2019

@jeiman You should post this question on StackOverflow, it's failing to install nokogiri (common Rails dependency not related to this project).

Blurb where it fails:

config.status: error: in `/var/lib/gems/2.3.0/gems/nokogiri-1.10.5/ext/nokogiri/tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.10/libxml2-2.9.10':
config.status: error: Something went wrong bootstrapping makefile fragments
    for automatic dependency tracking.  Try re-running configure with the
    '--disable-dependency-tracking' option to at least be able to build
    the package (albeit without support for automatic dependency tracking).
See `config.log' for more details
========================================================================
*** 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.

Nokogiri uses C extensions so it needs a compiler, it depends on your local environment but you will likely need build-essential, some expected version of libxml and the correct permissions, for example if you happen to have run a command as root and now you are trying to create files in that directory as a regular user you may face permissions issues.

@Arugin
Copy link

Arugin commented Dec 31, 2020

same problem here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants