Hassan,

On 2020-03-15 11:31, Hassan Schroeder wrote:
On Sat, Mar 14, 2020 at 3:52 PM Philip Rhoades <p...@pricom.com.au> wrote:

Docker crashed and I lost the Rails container so I have to go back to
the original source.

I don't know what "lost the Rails container" means. Can't you just
rerun the Dockerfile?


No.


Could someone suggest how I could fix the problem seen below? - I
deleted the Gemfile.lock file first.

Why?


Because leaving the original lock file there caused "bundle install --path vendor/bundle" to fail with:

Installing json 1.8.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /home/phr/src/ruby/rails/domain-sf/vendor/bundle/ruby/2.6.0/gems/json-1.8.3/ext/json/ext/generator /usr/bin/ruby -I /usr/share/rubygems -r ./siteconf20200315-119213-1sg3qup.rb extconf.rb
creating Makefile

current directory: /home/phr/src/ruby/rails/domain-sf/vendor/bundle/ruby/2.6.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR=" clean
rm -f
rm -f generator.so  *.o  *.bak mkmf.log .*.time

current directory: /home/phr/src/ruby/rails/domain-sf/vendor/bundle/ruby/2.6.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR="
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -DJSON_GENERATOR -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -o generator.o -c
generator.c
generator.c: In function 'generate_json':
generator.c:861:25: error: 'rb_cFixnum' undeclared (first use in this function); did you mean 'mFixnum'?
  861 |     } else if (klass == rb_cFixnum) {
      |                         ^~~~~~~~~~
      |                         mFixnum
generator.c:861:25: note: each undeclared identifier is reported only once for each function it appears in generator.c:863:25: error: 'rb_cBignum' undeclared (first use in this function); did you mean 'mBignum'?
  863 |     } else if (klass == rb_cBignum) {
      |                         ^~~~~~~~~~
      |                         mBignum
make: *** [Makefile:245: generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/phr/src/ruby/rails/domain-sf/vendor/bundle/ruby/2.6.0/gems/json-1.8.3 for inspection. Results logged to /home/phr/src/ruby/rails/domain-sf/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-1.8.3/gem_make.out

An error occurred while installing json (1.8.3), and Bundler cannot continue. Make sure that `gem install json -v '1.8.3' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  rails was resolved to 4.1.5, which depends on
    actionmailer was resolved to 4.1.5, which depends on
      actionpack was resolved to 4.1.5, which depends on
        actionview was resolved to 4.1.5, which depends on
          activesupport was resolved to 4.1.5, which depends on
            json


$ ./bin/rails s
/home/phr/src/ruby/rails/domain-sf/vendor/bundle/ruby/2.6.0/gems/activesupport-4.1.5/lib/active_support/core_ext/object/duplicable.rb:82:
warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
=> Booting Puma
=> Rails 4.1.5 application starting in development on

Did you originally develop this Rails 4.1.5 app using Ruby 2.6.0? Or
I guess more exactly have you been running it on that Ruby version
successfully?


I can't remember what version of Ruby it was - it was from earlier than 2015 . . it was running on whatever version of Ruby that was in the container - which is gone because the whole docker setup was corrupted . . I may have backups on old hard disks but it would take too long to try and re-create old OS environment, Docker version etc so I thought the best thing to do was just the Rails app running directly on my current machine (Linux Fedora 31).

Thanks,

Phil.
--
Philip Rhoades

PO Box 896
Cowra  NSW  2794
Australia
E-mail:  p...@pricom.com.au

--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/86d95cffebf21738357c0028368ec698%40lev.com.au.

Reply via email to