Open davidhooey opened 11 years ago
Thank you for posting this issue. I'm running into the same problem. What approach did you end up taking to work around this?
Same issue here but it represented differently (see #134): https://ci.appveyor.com/project/thisismydesign/appveyor-ocra/build/1.0.6
ERROR: Don't know where to put gemfile <some random file>
and when I tried to set a bundler path explicitly (bundle config --local path <>
):
https://ci.appveyor.com/project/thisismydesign/appveyor-ocra/build/1.0.9
ocra:42:in `relative_path_from': undefined method `path' for "<ruby path>":String (NoMethodError)
Sorry for the extremely late reply. Must have missed the notification. Anyways I ended up creating a temporary gemfile for OCRA to use.
# Temporary gemfile to be used by OCRA.
GEMFILE = 'ocra_gemfile'
# Add gems from gemspec.
ocra_gemfile = File.new(GEMFILE, 'w')
File.open("#{NAME}.gemspec",'r') do |file|
file.each { |line| ocra_gemfile.write "gem #{$1}\n" if line =~ /spec.add_dependency (.+)/ }
end
ocra_gemfile.close
# Execute OCRA
system("ocra --gemfile #{GEMFILE} --console script_name")
# Cleanup
FileUtils.rm Dir.glob(GEMFILE)
If I use 'gemspec' in the Gemfile to reference the gems in the myapp.gemspec file...
...ocra fails with the following error...
If I explicitly add the gems in the Gemfile all is well.
I'm using the following command to build the exe.
Thanks!