Pito Salas

Joined

380 Experience
2 Lessons Completed
0 Questions Solved

Activity

Posted in Setup MacOS 14 Sonoma Discussion

Hi Chris, I am doing this on Pub Beta 2, and I am getting this error.

configure: error: something wrong with LDFLAGS="-L/Users/pitosalas/.asdf/installs/ruby/3.0.6/lib "

No amount of googling has helped me. Any idea? Thanks!

Posted in Weird error in cable ready?

cable_ready 4.5.0
rails 6.1.4.1
ruby 3.0.2p107

This is a simple example from the basic tutorial (https://www.youtube.com/watch?v=F5hA79vKE_E) I suspect the error I am getting is because either cable_ready or rails evolved a little and created a tiny incompatibility.

When do the broadcast, I get this in the java console:

TypeError: undefined is not a function (near '..operations.forEach...")
- perform - cable readv.is:13
- received  - timeline_channel.js:15
- map
- message
WebSocket connection to 'ws://0.0.0.0:3011/cable' failed: WebSocket is closed due to suspension.

Here it is

It is triggered when in my controller I ask cable ready to:

cable_ready["timeline"].console_log(message: "***** cable ready post created")

[1]:

Which leads to my timeline_channel to:

received(data) {
    console.log("******** Received data:", data.operations)
    if (data.cableReady) CableReady.perform(data.operations)
  }

My interpretation is perform causes this line in cable_ready.js line 13:

  operations.forEach(function (operation) {
    if (!!operation.batch) batches[operation.batch] = batches[operation.batch] ? ++batches[operation.batch] : 1;
  });

Is finding something in the received data that it doesn't like.

That's where my trail ends. Can someone see what I am doing wrong, or tell me what other code you'd like me to include?

Posted in Docker Basics for Rails Discussion

What if I have a windows computer and dont want to install ruby on the computer. Can I create a docker environment that has ruby and rails installed and where I do all the development, editing, rails new inside the image. Even run vscode outside and ssh into the image. Is that possible, and do you have a pointer for an article of yours or elsewhere to help me set that up?

Posted in Setup MacOS 11.0 Big Sur Discussion

COMMENT ADDED: I found the problem. I had a -B in my .railsrc from a long time ago, which told it not to run bundler and from that it decided not to do rails webpacker:install. (I really dislike and continue to be confused by the way webpacker is (not) integrated into rails)

ORIGINAL QUESTION: I guess I must be unique, because I got an error no one has reported. This is on the MacOS beta (latest), and I have everything up to this point installed correctly. I also did an extra bundle command just to be sure. Here's the error:

~/mydev/gorails/myapp (master) rails s
=> Booting Puma
=> Rails 6.1.4 application starting in development
=> Run bin/rails server --help for more startup options
Exiting
/Users/pitosalas/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/webpacker-5.4.0/lib/webpacker/configuration.rb:103:in `rescue in load': Webpacker configuration file not found /Users/pitosalas/mydev/gorails/myapp/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /Users/pitosalas/mydev/gorails/myapp/config/webpacker.yml (RuntimeError)

I'm having trouble following the tutorial. Can you share the source for the example you were showing?

Posted in Rails latest (6.1.1) with Ruby latest (3.0.0)

Hey Chris, where's the Slack again?

Posted in Rails latest (6.1.1) with Ruby latest (3.0.0)

Thanks. I was following a tutorial (not here) and there were certain details about what layouts/application.erb was supposed to look like and it didn't match. Then I had a problem which I think was due to a bundler version. All that got me thinking... (Btw other than your excellent responses, where would you say is the go-to place to post questions like this? Is it stack overflow? or https://discuss.rubyonrails.org? Or somewhere else?

Posted in Rails latest (6.1.1) with Ruby latest (3.0.0)

Starting to teach another semester I like to recommend the latest versions that work correctly and/or are recommended by the maintainers. I can’t find a proper recommendation, and I’ve seen a few glitches with 3.0.0 + 6.1.1. I don’t know if those glitches are my fault or due to my using those packages. What is your recommendation?

Posted in Stimulus JS Twitter UI: Part 1 Discussion

Great episode! I did find some things didn't reproduce with Rails 5.2 etc.

Posted in Stimulus JS Twitter UI: Part 1 Discussion

Is the source code for this (and other) episodes available? I am having some small problems following along.