Comment # 12 on bug 1069441 from
(In reply to Ludwig Nussel from comment #9)
> 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: