You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe this is a dumb idea but I wanted to create an issue page to maybe help somebody in the future who has the problem I just had. I'm setting up Cucumber and Poltergeist and PhantomJS in a Docker container. I'm using the phantomjs gem to install PhantomJS because apt-get can't find the phantomjs package. The gem initially failed to install:
$ docker-compose run web bundle
exec cucumber
Phantomjs does not appear to be installed in /root/.phantomjs/2.1.1/x86_64-linux/bin/phantomjs, installing!
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:100 333 0 333 0 0 567 0 --:--:-- --:--:-- --:--:-- 4162
bunzip2: phantomjs-2.1.1-linux-x86_64.tar.bz2 is not a bzip2 file.
tar: phantomjs-2.1.1-linux-x86_64.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
There was an error while trying to load the gem 'phantomjs/poltergeist'. (Bundler::GemRequireError)
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
/ticket-driver/config/application.rb:7:in `<top (required)>'
/ticket-driver/config/environment.rb:2:in `require_relative'
/ticket-driver/config/environment.rb:2:in `<top (required)>'
/usr/local/bundle/gems/cucumber-rails-1.4.4/lib/cucumber/rails.rb:7:in `require'
/usr/local/bundle/gems/cucumber-rails-1.4.4/lib/cucumber/rails.rb:7:in `<top (required)>'
/ticket-driver/features/support/env.rb:7:in `require'
/ticket-driver/features/support/env.rb:7:in `<top (required)>'
/usr/local/bundle/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load'
/usr/local/bundle/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load_code_file'
/usr/local/bundle/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:142:in `load_file'
/usr/local/bundle/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:84:in `block in load_files!'
/usr/local/bundle/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `each'
/usr/local/bundle/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `load_files!'
/usr/local/bundle/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:253:in `load_step_definitions'
/usr/local/bundle/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:61:in `run!'
/usr/local/bundle/gems/cucumber-2.4.0/lib/cucumber/cli/main.rb:32:in `execute!'
/usr/local/bundle/gems/cucumber-2.4.0/bin/cucumber:8:in `<top (required)>'
/usr/local/bundle/bin/cucumber:16:in `load'
/usr/local/bundle/bin/cucumber:16:in `<main>'
It failed because it's trying to download the distribution file to the $HOME folder. That folder didn't exist for that user in my Ruby container.
I solved the problem by adding this to my Dockerfile:
ENV home=/var/tmp
Maybe it might have been nice to be able to specify that somehow through the Gemfile? Not sure if that's even possible? Maybe this is a dumb suggestion you should close, I just wanted to post my story to get it onto the Google radar of anybody who can't figure out how to install PhantomJS in a Docker container using this gem.
The text was updated successfully, but these errors were encountered:
@endymion There's a setter method for the download folder, you can configure it like this:
Phantomjs.base_dir = File.join(File.expand_path(YOUR_DESIRED_FOLDER), '.phantomjs', Phantomjs.version)
Before using Phantomjs.path
Fine. I Resolved, add the configuration on capybara.rb in supports for rspec.
But, install phantom each run rspec... i can change this for install one?
Maybe this is a dumb idea but I wanted to create an issue page to maybe help somebody in the future who has the problem I just had. I'm setting up Cucumber and Poltergeist and PhantomJS in a Docker container. I'm using the phantomjs gem to install PhantomJS because apt-get can't find the phantomjs package. The gem initially failed to install:
It failed because it's trying to download the distribution file to the
$HOME
folder. That folder didn't exist for that user in my Ruby container.I solved the problem by adding this to my Dockerfile:
Maybe it might have been nice to be able to specify that somehow through the Gemfile? Not sure if that's even possible? Maybe this is a dumb suggestion you should close, I just wanted to post my story to get it onto the Google radar of anybody who can't figure out how to install PhantomJS in a Docker container using this gem.
The text was updated successfully, but these errors were encountered: