core-plans
core-plans copied to clipboard
[scaffolding-ruby] Traveller's Notes - by someone flying by the seat of their pants
Hi there,
For my sin's I've been tasked with seeing if I can package up a rails, I'm still on a bit a of journey and I haven't got it working yet but I've noticed a few things which I think could improve the experience for the next person.
I'll attempt to list the issues here and I'll raise PR's for the work arounds I've worked out how to fix but somethings I don't have a scooby about, so any advice would be gratefully appreciated.
-
~
Remove -rubygems warning
~ UPDATE: PR Merged to fix this I noticed thisseems to be linked to this
eval "$(ruby -rubygems -rrbconfig - <<-'EOF'
in https://github.com/habitat-sh/core-plans/blob/5e8434c1e9038340e400b2c40c3ddec1c9824967/scaffolding-ruby/lib/scaffolding.sh#L35 appreciate it's only a deprecation warning but I'll PR it. -
~
Bundler error
~ UPDATE: PR Merged to fix thisLooks like --no-ri & --no-rdoc aren't valid anymore, I'll PR the use of --no-document instead
-
Additional Gem Helpers
I can see that you currently add package dependencies based on the presence of gem's within the Gemfile, would you be happy to include some more?- mysql2 will need core/mysql-client
- mini_magick will need core/imagemagick
-
~
default database adapter
~ UPDATE : I went with using the null driver, I'll add an example to the scaffolding within the scaffolding I can't see to work out how to stop it thinking that I want to use postgres as my default database adapter? I'm using mysql but the scaffolding is expecting the pg gem present, which it isn't so my build fails. -
rake assets:precompile fails but build carrys on UPDATE: I would still require a hand with this it would be nice if I could precompile my assists, I can see that it try's but errors (for reasons I'll list below) but should the scaffolding catch a
rake abort
and not carry on? -
~LoadError: libatomic.so.1 for mysql2 gem~
this one's a bit tricky but this is the error I get in the build, its complaining that it can't find
libatomic.so.1
but I know glibc-libs is already installed and if I look at an ldd of the file, it look like there's two entries?any ideas? UPDATE including core/gcc-libs package dependency resolved this, guess adding it like this meant that it found the libararys within the RPATH
-
~specifying the version of node~ UPDATE : No longer required, it was yarn that has the node dep and so this isn't required personally I could do with being able to specify the node package, what do you think about defining a new var that can be used to override which node package is included? https://github.com/habitat-sh/core-plans/blob/55eda5e74c562afc15be09048a0036b60911e549/scaffolding-ruby/lib/scaffolding.sh#L655-L661 something like
scaffolding_ruby_node_pkg
use that package other wise go withcore/node
? happy to raise a pr if its something the maintainers would like to do? -
add support for rail6 Rails 6 apps aren't currently being detected so I will raise a PR to add support for this
Hi @username-is-already-taken2 , did you ever find a work around for the rake asset precompile error? Im experiencing similar issues due to a missing libsass.so file.
Also thanks for opening the PRs to fix some of these issues, hopefully @robbkidd can review/merge them soon 😊