Open endymion opened 8 years ago
@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
I have this problem, but i can't resolve with this two explanations.
Ever show me the next message
Phantomjs does not appear to be installed in /root/.phantomjs/2.1.1/x86_64-linux/bin/phantomjs, installing!
Where configure Phantomjs.base_dir? In Rails helper? In Initializers folder?
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.