Ask A Question

Notifications

You’re not receiving notifications from this thread.

Group Chat with ActionCable: Part 1 Discussion

Great tutorial. Can't wait to see Part 2.

Reply

Thanks a lot, Chris, good job, looking forward to the Part II.

Reply

Nice job. Look forward to #2.

Reply

Awesome! Thanks Chris. Looking forward to the rest of the series.

Reply

Can you post the block of modified navbar code that you inserted into application.html.erb? I wasn't able to catch all of it on the screen to see the changes made.

Reply

You can find the code for the navbar here: https://github.com/excid3/f...

Reply

This was great Chris (edit sorry wrong name lol)! Thanks! I can't wait until you dive into the actual ActionCable. What is the ETA on the second episode?

Reply

Just published it! https://gorails.com/episode...

I'll be publishing about one a week so I have time to get through everything.

Reply

Chris, don't forget to validate uniqueness of the username.

Reply

Thanks! I'll try to make sure I include that.

Reply

Hey im new to rails and still getting quite comfortable with Ruby. But I seen that version 5.0 of Rails is out. How do I upgrade/install it? Thanks!!

Reply

You can just run "gem install rails" and that should install Rails 5. I'll be doing a screencast on upgrading an existing app to Rails 5 pretty soon.

Reply

I'm using Monokai in just about all places, vim, zsh, etc.

Reply

Hi Chris,
How are you getting those icons like padlock in the text_field?

Reply

Those are actually just the LastPass extension trying to save my passwords.

Reply
Ferran Cabrer i Vilagut Ferran Cabrer i Vilagut

Thanks Chris, I was following building this awesome app, but at (Part-2 at 8:19) I got stuck by this error: Undefined method @chatroom_user = @chatroom.chatroom_users.where(user_id: current_user.id)
How can I fix it in order to continue the app?
Thanks in dvance

Reply
Fritz Rodriguez Jr. Fritz Rodriguez Jr.

Hey Chris! I know I'm late to the party...haha! I found a way of adding custom fields with Devise that I like...

def configure_permitted_parameters
added_attrs = [:username, :email, :password, :password_confirmation, :remember_me]
devise_parameter_sanitizer.permit :sign_up, keys: added_attrs
devise_parameter_sanitizer.permit :account_update, keys: added_attrs
end

This makes it super easier to add additional fields in the future. Anyway, just a quick tip! :)

Reply

I like the added_attrs array. It's nice to reuse since I had always just defined the items in each place.

Reply

Hello Chris,
thank you for the tutorials. I was wondering if you could make a tutorial for setting up MacVim just like you have? I have tried myself, however, I can not seem to figure out how to do it.

Thanks,

Reply

Absolutely. Check this out: https://gorails.com/episode...

Reply

That devise-bootstrapped gem is a time saver ;)

Reply

Credit for that goes to @andrew_fomera:disqus. :D

Reply

Thanks for the kind words! If you have any feedback for improvements feel free to hit up the github issues!

Reply
loveisnuclear loveisnuclear

Hi, this is a great tutorial so far! However, i'm having some issues near the end. After I add the Devise permitted parameters to the application controller and I try to sign up, I can no longer access the site (even after refreshing and trying to go back to the main page. It gives me a NoMethodError in Chatrooms#index. It says "undefined method `public_channels' for #<activerecord::associations::collectionproxy []="">
Did you mean? public_send" and that the error is from application.html.erb. I replaced my code in that file with yours from the github repo, but i'm still getting the same error. Can someone please point me in the right direction? Thanks!
https://uploads.disquscdn.c...

Reply

Hey! I believe that should be just

><% current_user.chatrooms.each do |chatroom| %>

because we didn't build anything called "public_channels" I don't believe.

You can find that line in the github repo here: https://github.com/gorails-...

Reply

Hello @excid3:disqus
First of all wonderful tutorial. I have a question, please see if you can help out,

I have a question model and a conversation model, a student asks a question and based on that question a teacher chats with that student. Please note only one teacher and one student are allowed in conversation per question. A student can only ask one question per email address. Now we wanna introduce a live chat support system for our support team to be able to chat with students. Now this chat room should be unique to each question and any number of support users can be present but only one student. How should I go about creating models for chat room based on your tutorial?

Reply

weird. I keep on getting this error.

ereks-MacBook-Pro-4:slack.io DerekJLin$ rails s
=> Booting Puma
=> Rails 5.2.1 application starting in development
=> Run `rails server -h` for more startup options
Exiting
/Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/puma-3.12.0/lib/puma/launcher.rb:343:in `stat': No such file or directory @ rb_file_s_stat - /Users/DerekJLin/slack.io (Errno::ENOENT)
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/puma-3.12.0/lib/puma/launcher.rb:343:in `generate_restart_data'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/puma-3.12.0/lib/puma/launcher.rb:64:in `initialize'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/puma-3.12.0/lib/rack/handler/puma.rb:66:in `new'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/puma-3.12.0/lib/rack/handler/puma.rb:66:in `run'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/rack-2.0.5/lib/rack/server.rb:297:in `start'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:53:in `start'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:142:in `tap'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:142:in `perform'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/command/base.rb:65:in `perform'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/command.rb:46:in `invoke'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/commands.rb:18:in `<main>'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
from /Users/DerekJLin/Desktop/slack.io/bin/rails:9:in `<top (required)>'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
from /Users/DerekJLin/Desktop/slack.io/bin/spring:15:in `require'
from /Users/DerekJLin/Desktop/slack.io/bin/spring:15:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'

Reply

Amaría saber inglés para poder entender el tutorial :( gracias por el aporte de todos modos.!

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.