Chris Oliver

Joined

290,710 Experience
86 Lessons Completed
298 Questions Solved

Activity

Posted in Group Chat with ActionCable: Part 1 Discussion

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

Posted in Group Chat with ActionCable: Part 1 Discussion

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.

I chose DO because I like running my own servers and its significantly cheaper than running on Heroku for personal or small business projects. You'll have to do a lot more work, but it can be fun so long as you make sure you have backups and all that in place.

In that case, you'll typically build the CSV and then store it on S3 in a background job, and then provide the user with a link to download it. You can send them an email once it's uploaded or you can refresh the page periodically with AJAX until the download URL is saved to a record. Really sorta depends, but when things get outside that time window, you'll see lots of apps taking this approach.

Yes! This is almost finished. I've been working on this feature as an update along with grouping episodes into series so they're easier to follow along. This should be released shortly.

Posted in Screencast Request: iOS / Android Adapter Example

I'm way behind, but I did an episode on this briefly to explore what you'll need to do: https://gorails.com/episodes/turbolinks-5-forms?autoplay=1

I'm going to be building some more like this, and also APIs for your mobile app if you need it to be native as well. It's helpful to dive into the iOS code and everything to understand how your Rails API will be consumed, so I'm sure we'll be doing some of that as well.

The Turbolinks 5 adapters are super slick and really make it a lot easier to manage though if you don't need too much native stuff.

I'm doing a series of videos on this as we speak. :)

Basically you'll want to keep track of them server side and then on connect, you'll loop through the connected rooms and stream from each.

Posted in Episode Suggestion:

Definitely! I will be doing this in the near future.

Also check out the Montrose gem for this as well. You can use it to create them in memory, and to save them to the database, you'd just need to make sure you saved the same properties.

Posted in How to I Architect my application?

Can you elaborate on the kind of transactions you want between them? What about building 3 separate apps, separate databases, and then defining your own internal API to communicate between them for those transactions?

Posted in Better Errors ignore 404 errors

Yeah, not much better way to test it that I know of unfortunately. As long as you're throwing that exception, you shouldn't have any problems.

Posted in Better Errors ignore 404 errors

I think it's always going to thrown an exception in development because that's internal to Rails. You can navigate to /404 to see your 404 page and Rails will catch any ActionController::RoutingError or ActiveRecord::RecordNotFound and render the 404 when in production mode.

I guess you could either run in production mode locally (the real true test) or you could rescue_from those exceptions. Something like so:

rescue_from ActiveRecord::RecordNotFound, :with => :rescue404
 rescue_from ActionController::RoutingError, :with => :rescue404

  def test_404
    render file: 'public/404.html', status: :not_found, layout: false    
  end

I forgot that changed recently, great reminder. Thanks for sharing that!

Posted in Setup MacOS 10.11 El Capitan Discussion

If your error was like his, it is showing that the "source" line also got copied into the file, so the ending single quote didn't get applied right most likely to close the string. Not having an ending semicolon is fine (just tested it again). Sometimes when pasting stuff into terminal there are weird things that cut off lines short or your browser can mess with quotes and make them curly when they should be straight (http://practicaltypography.... That shouldn't happen in a code block though. I can't reproduce the issue you guys are having with Chrome and both iTerm and Terminal so not entirely sure what's wrong for you guys, but it's one of these things.

Posted in Subscriptions with Stripe Discussion

Likely some configuration issue. I'm not entirely sure what causes that, but it's definitely fine to run on localhost. Probably like this guy where you've got a mistake somewhere causing their JS to run incorrectly: http://stackoverflow.com/a/...

Posted in Setup MacOS 10.11 El Capitan Discussion

You should just copy and paste each line into your terminal and run each one. Make sure that your copy/paste didn't mess up the command during the paste. I'm not sure what's causing you guys to get malformed commands.

Posted in Setup MacOS 10.11 El Capitan Discussion

Your ~/.bash_profile should just have one line that is that same as what's in the single quotes on that first line.

if which rbenv > /dev/null; then eval "$(rbenv init -)"

Looks like he had accidentally combined those two commands to run on accident.

Pretty simple. You'd need to basically listen for the subscription cancellation webhook to come across and then in there you can just move the user's plan over. The webhook will be your way of knowing that the last payment attempt failed and the user's paid subscription canceled. It'll just send a notification to your server and as long as you're listening for it, you can run the code to downgrade to the free plan. Make sense?

Check out this episode on the webhook stuff if you haven't already: https://gorails.com/episode...

Posted in How to link the liked posts by each user?

Always happy to help. :)

Posted in How to link the liked posts by each user?

Hey Lauro,

link_to requires two parameters, first the name, second the URL you want to point to. You've only passed in the name, so it's not going to link correctly for you. Try passing in a second parameter to get that working:

  <h3> <%= link_to like.post.title, like.post %></h3>

Posted in Solving FizzBuzz in Ruby Discussion

You can do str += n.to_s if str.empty? instead because it's an integer and needs to be converted to a string before you can add those together.