These are chat archives for opf/openproject

19th
May 2015
Martin Linkhorst
@linki
May 19 2015 15:20
does somebody know why i cannot require oj/oj when asset precompiling?
Step 25 : RUN RAILS_ENV=production SECRET_TOKEN=foobar DATABASE_URL=sqlite3://db/ignore_me.sqlite3   bundle exec rake assets:precompile
 ---> Running in 299dfa890468
require 'rails/all'... 0.800s
Bundler.require... rake aborted!
LoadError: cannot load such file -- oj/oj
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `require'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `block in require'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:236:in `load_dependency'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `require'
/app/vendor/bundle/ruby/2.1.0/gems/oj-2.11.4/lib/oj.rb:42:in `<top (required)>'
Martin Linkhorst
@linki
May 19 2015 15:28
inside a docker container i have to say
app@92125552d34f:/app$ bundle show oj
/app/vendor/bundle/ruby/2.1.0/gems/oj-2.11.4
bundle show works just fine, grml
Alex Coles
@myabc
May 19 2015 15:29
@linki oj/oj is probably a native extension
did it compile correctly?
on my Mac it’s oj/oj.bundle.
Martin Linkhorst
@linki
May 19 2015 15:30
app@92125552d34f:/app$ bundle exec irb
irb(main):001:0> require 'oj/oj'
LoadError: cannot load such file -- oj/oj
    from (irb):1:in `require'
    from (irb):1
    from /usr/bin/irb:11:in `<main>'
irb(main):002:0> puts $LOAD_PATH.grep /oj/
/app/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0/oj-2.11.4
/app/vendor/bundle/ruby/2.1.0/gems/oj-2.11.4/lib
/app/vendor/bundle/ruby/2.1.0/gems/oj-2.11.4/ext
=> nil
irb(main):003:0> exit
app@92125552d34f:/app$ ls /app/vendor/bundle/ruby/2.1.0/gems/oj-2.11.4/lib
oj  oj.bundle  oj.rb
app@92125552d34f:/app$ 
app@92125552d34f:/app$ ls /app/vendor/bundle/ruby/2.1.0/gems/oj-2.11.4/lib/oj
active_support_helper.rb  bag.rb  error.rb  mimic.rb  saj.rb  schandler.rb  version.rb
oj/oj is not there, right?
ok, it's under ext
app@92125552d34f:/app$ ls /app/vendor/bundle/ruby/2.1.0/gems/oj-2.11.4/ext/oj | grep oj
oj.bundle
oj.c
oj.h
oj.o
Alex Coles
@myabc
May 19 2015 15:33
on my Mac, it’s in lib/
in anycase, oj.bundle isn’t going to be much use on Linux :)
Martin Linkhorst
@linki
May 19 2015 15:36
right, it's mounted in from my mac, i'll try again
Alex Coles
@myabc
May 19 2015 15:36
oj.so
should be there
Martin Linkhorst
@linki
May 19 2015 15:48
damn, it works now
Florian Kraft
@floriank
May 19 2015 15:48
self solving problems are ze best
Martin Linkhorst
@linki
May 19 2015 15:49
app@269a93fe6668:/app$ ls -la /app/.bundle/gems/ruby/2.1.0/gems/oj-2.11.4/lib/   
total 752
drwxr-xr-x 3 app app   4096 May 19 15:38 .
drwxr-xr-x 5 app app   4096 May 19 15:38 ..
drwxr-xr-x 2 app app   4096 May 19 15:38 oj
-rw-r--r-- 1 app app   1536 May 19 15:38 oj.rb
-rwxr-xr-x 1 app app 753224 May 19 15:38 oj.so
changed to a different bundle install --path so that it doesn't clash
wondering why this happens now :confused:
Mihail Maxacov
@0xF013
May 19 2015 15:54
oj.simpsons