[Bug 1069441] New: [Build 20171121] rails test fails: Could not find gem capybara
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441 Bug ID: 1069441 Summary: [Build 20171121] rails test fails: Could not find gem capybara Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other URL: http://openqa.opensuse.org/tests/538546/modules/rails/ steps/12 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Ruby Assignee: ruby-devel@suse.de Reporter: dimstar@opensuse.org QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- ## Observation openQA test in scenario opensuse-Tumbleweed-DVD-x86_64-extra_tests_in_textmode@64bit fails in [rails](http://openqa.opensuse.org/tests/538546/modules/rails/steps/12) ## Reproducible Fails since (at least) Build [20170905](http://openqa.opensuse.org/tests/479254) ## Expected result Last good: [20170904](http://openqa.opensuse.org/tests/478535) (or more recent) ## Further details Always latest result in this scenario: [latest](http://openqa.opensuse.org/tests/latest?test=extra_tests_in_textmode&flavor=DVD&machine=64bit&arch=x86_64&distri=opensuse&version=Tumbleweed) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c1
Marcus Rückert
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c4
Zaoliang Luo
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c5
--- Comment #5 from Marcus Rückert
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c6
--- Comment #6 from Dominique Leuenberger
rails server Could not find gem 'capybara (~> 2.13)' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems.
rubygem-capybara does not exist in TW -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c7
--- Comment #7 from Dominique Leuenberger
diff --git a/tests/console/rails.pm b/tests/console/rails.pm index c4f00c05..1769370f 100644 --- a/tests/console/rails.pm +++ b/tests/console/rails.pm @@ -21,9 +21,9 @@ sub run { # need to handle this on our own my $cmd = <<'EOF'; zypper -n in -C "rubygem(rails)" -rails new -B mycoolapp +rails new mycoolapp -B --skip-test cd mycoolapp -(rails server &) +(rails server -b 0.0.0.0 &) for i in {1..100} ; do sleep 0.1; curl -s http://localhost:3000 | grep "<title>Ruby on Rails" && break ; done pkill -f "rails server" || pumactl -P tmp/pids/server.pid stop EOF
For the tests to be usable, capybara and selenium-webdriver are missing in the distro (and they should be pullded in with zypper in -C "rubygem(rails)" As to why I need -b 0.0.0.0 in the server call I could not yet find out, but without it, I saw errors like getaddrinfo: Name or service now known (SocketError) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c9
Ludwig Nussel
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c10
--- Comment #10 from Ivan Kapelyukhin
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c12
--- Comment #12 from Marcus Rückert
Moving over to Leap as this test is still red and getting rails to work sucks big time still.
The work flow that works is
# zypper -n in -C "rubygem(rails)" # zypper in gcc make ruby2.5-devel libxml2-devel glibc-devel libxslt-devel sqlite3-devel $ rails new mycoolapp --skip-bundle --skip-test $ cd mycoolapp $ bundle config build.nokogiri --use-system-libraries $ bundle install --path vendor/bundle $ rails server -b 0.0.0.0
That is far away from obvious and plug&play, at least not to me. So question to the rails folks. Is that work flow expected and well known? If not, how about documenting it in the wiki and/or release notes?
Moreover, can we make that easier? For example, there already is a devel_ruby pattern. Would it make sense to just add the aforementioned devel package requirements to this pattern, so instead of installing the rails gem we document installing the pattern instead?
Also, can the nokogiri config be made default?
1. You should *not* build all those gems via bundler. those gems are all there via system gems already. you pass --skip-bundle to tell it "do not run bundle install" ... but then manually do the step you just told it not to. 2. no we can not ... because you explicitely skip the system nokogiri with your bundle install. one could maybe patch the template files that rails uses but tbh ... we would need this "use system libraries" with so many libraries, maybe some which we dont even know about. that this is tedious. and some of the packaged gems we actually had to patch to allow building with system copies. 3. my steps: $ zypper in --recommends 'rubygem(rails)' 'rubygem(sqlite3)' 'rubygem(puma)' $ rails new mycoolapp --skip-bundle --skip-test $ cd mycoolapp $ export RAILS_ENV="production" $ rails server WARNING: Nokogiri was built against LibXML version 2.9.7, but has dynamically loaded 2.9.8 => Booting Puma => Rails 5.1.5 application starting in production => Run `rails server -h` for more startup options Puma starting in single mode... * Version 3.11.2 (ruby 2.5.0-p0), codename: Love Song * Min threads: 5, max threads: 5 * Environment: production * Listening on tcp://cubes:3000 Use Ctrl-C to stop ^C- Gracefully stopping, waiting for requests to finish === puma shutdown: 2018-04-24 10:22:48 +0000 === - Goodbye! Exiting this was on TW ... but basically should work the same on L150 we probably should add puma and sqlite3 to the recommends list. installing rails without the --recommends is a bit tedious but we do *not* want to add requires for all the other things because it is possible to create rails apps without using the recommended libraries. so moving the recommends to requires would be wrong. Adam: This has *nothing* to do with packaging rails apps. So a totally unneeded comment. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c13
--- Comment #13 from Duncan Mac-Vicar
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c15
--- Comment #15 from Marcus Rückert
I can't speak for all ruby developers, but I have done enough Rails to have my own opinion.
I can't imagine the situation where I would use a distro packaged Rails.
I only need:
- ruby - rubygem-bundler
If you are fine with a) having all the devel packages on your host b) you are fine to having to redo all the fixes that we might have in our gem based packages (e.g. I had a seed-fu fix for a while) c) you are fine with not getting security and other bugfix backports. I totally agree for just installing ... bundle install is so much easier. sadly it totally sucks for maintenance. (In reply to Duncan Mac-Vicar from comment #13)
I agree with Ludwig, the steps on -devel packages are confusing, but OSX users have it worse, and the majority of Rails developers probably use Macs.
yes ... that's why we have so many intree copies of C libraries in Gems... the worst is the libv8 gem ... which is a complete libv8 runtime repackaged as gem. If you are lucky the gem upstream updates the copy of the C library ... and if you are even more lucky ... you can actually update to that to the version with the fixed intree copy. Now you could argue ... "I just build against the system copy" ... if the gem supports it.
For example, as Ludwig described, the pattern could install the devel packages of the most important gems, but additionally, it could install something in the environment that sets NOKOGIRI_USE_SYSTEM_LIBRARIES=1.
This env var is just the same his bundle config cmdline. If you don't want to use the rpmified gems. Feel free. But this bug is not about that. your use case is just working fine. There are users who want to use rpmified rails. And we need it working for rails apps that we ship. So can we focus on that for now? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c19
--- Comment #19 from Marcus Rückert
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c20
James Mason
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c21
Tony Su
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441
http://bugzilla.opensuse.org/show_bug.cgi?id=1069441#c22
Marcus Rückert
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com