Greg S

Joined

880 Experience
6 Lessons Completed
0 Questions Solved

Activity

Posted in How to Deploy Rails to Fly.io Discussion

PS. I'm not hurrying waiting for more tutorials and discussions. I've got a dozen tabs already opened to dig through.

Posted in How to Deploy Rails to Fly.io Discussion

Can't help with that, but am looking more into fly.io. It sets up the Docker automatically. I am having trouble deploying and have to dig further. With a Postgres db appears to be ⅓ the price of Heroku. If that is the case I might keep my three toy apps going.

Posted in How to Deploy Rails to Fly.io Discussion

Great. Sets up Docker which I didn't want to get into, so that's a great help. Trying it. Looks like $7/month with a Postgres db.

Posted in Hobby server alternatives since Heroku going paid

I've got two truly hobby Rails apps on Heroku and they get almost no use. Heroku was easy enough for me and I have Postgres databases at AWS. Now that Heroku is changing to pay only, it's not worth it to me to keep my apps there. AWS is too complicated. What are free or low cost options to Heroku.

mini_exiftool and exif gems for meta tags. I found exif less complete but faster. The gems use ExifTool (https://exiftool.org).

Posted in What's with the elitism against Javascript?

Read the history of JavaScript. It was written in two weeks (fact check needed) and it shows. But because browsers support it you can't change to another language for almost anything on the web. My simplified version.

Posted in Setup MacOS 12 Monterey Discussion

@jongwon. What happens if you add gem sqlite3 to your Gemfile and bundle install?

Posted in How to Add Pagination with Pagy Discussion

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?

Posted in JavaScript not working for Bootstrap 5 on Rails 7

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

Posted in Primer on Rails 5.1's new UJS library Discussion

I hate to have to say this. But it appears some moderation is necessary for the discussions.

Posted in Impossible to install Nokogiri - OSX Mojave 10.14.2

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

Posted in How to use ESBuild in Rails with JSBundling Discussion

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.

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.