Greg S
Joined
Activity
Posted in Setup MacOS 12 Monterey Discussion
@jongwon. What happens if you add gem sqlite3
to your Gemfile and bundle install
?
Thanks. Got working without any problems with Rails 7.0.1, Ruby 3.1.0, esbuild and Bootstrap
@newbie. Did you create ` in config/initializers/pagy.rb' in the right place? Restart server?
On Rails 7.0.1 Ruby 3.1.0, I had to run yarn
to fix some issues. Also changed package.json. Note that some current Ruby and Rails versions aren't compatible. My new Rails was rails new rails71a --j esbuild --css bootstrap --database postgresql
. Not sure what the tutorial used.
Posted in Installing Tailwind with Rails 7
Why not stick with Bootstrap? Assuming it's missing something you want.
Posted in creating new rails app error
I'm somewhat of a beginner myself. I cycle through various things trying to get new apps working. I'm mostly creating them to use tutorials. But sometime gem install rails
or gem update rails
, although in principal that shouldn't matter. bundle update
while in the app is often a help. Sometimes yarn
depending on what else is installed. On my Mac, zsh
which relaunches some of the system (that's not accurate description). You'd probably have to go back to Rails 6 and Ruby 2 for consistency , but then you can't play with the new toys of Rails 7 easily.
Posted in creating new rails app error
rails -v and ruby -v? Many issues as the updates to Ruby and Rails require minor fixes.
May be old, but I'd missed it. Thanks
I hate to have to say this. But it appears some moderation is necessary for the discussions.
brew install libxml2
bundle config build.nokogiri --use-system-libraries --with-xml2-include=/usr/include/libxml2/
I have this in my notes and I got the answer on Stackoverflow.
Posted in Setup MacOS 11 Big Sur Discussion
Question: When I run ruby -v I get the response ruby 2.6.3 instead of ruby 3.0.2
Did you run rbenv global 3.0.2
?
I don't use rbenv, so this is a guess.
I use chruby which is bit more basic and easier than rbenv. https://github.com/postmodern/chruby
Does it make sense to have esbuild-rails built into Rails? And should the esbuild.config.js file go in the /config folder or do files in that folder have to be Ruby?
I wanted something like this, but for my purposes more complicated than it's worth. But glad to see the posting and video. Just realized all the posts are four years old. But seems it is well supported and used.
For Bootstrap you added to application.scss
(I may have named my folder differently:
import "bootstrap"
import 'bootstrap/dist/js/bootstrap'
and
@import '../css/bootstrap_custom';
@import "~bootstrap/scss/bootstrap"; // the tilde seems to be optional?
I reverse engineering this for an OpenLayers' module but the directory structures don't seem to follow a pattern and I plan to add other OpenLayers modules and wondered if how one knows what to add where? Although adding to application.js
seem to work but javascript/css/application.scss
is more logical.
gems were easier, but none current is available for OpenLayers. Seems to me application.js file should be in javascripts not buried in packs. Maybe I need a primer on Webpack.
Thank you for the great web casts.
Am I right that a new upload copies over (or deletes) previous uploads even with had_many?
Second question. Is there any way to associate a title or caption with the uploaded image?
PS. Great video, helped me with setting up ActiveStorage. I updated to 5.2 to get AS.