Chris Oliver

Joined

290,710 Experience
86 Lessons Completed
298 Questions Solved

Activity

Posted in rbenv: bundle: command not found

It looks like your bundler on the machine is installed globally and not from rbenv. It might have been related to something you did previously. Basically you don't want to have to ever run sudo and if you do, you know something is configured wrong.

On my machine, I've got this (which is what you want, just with your user):

$ which ruby
/Users/chris/.rbenv/shims/ruby
$ which gem
/Users/chris/.rbenv/shims/gem
$ which bundle
/Users/chris/.rbenv/shims/bundle

It might be that you also don't have the gem command coming from rbenv. If you run gem install bundler and it doesn't use the rbenv gem command, it will use the system ruby and that's not going to be useful for you.

Posted in rbenv: 2.1.2 is not installed or not found

Haha, that would do it! I imagine that there are a few places where I could clean up the tutorial to show you on which machine to run which commands.

Posted in Using Vagrant for Rails Development Discussion

Yeah, /vagrant is inside the VM, not on your local machine.

Posted in File Uploading with Carrierwave Discussion

I would definitely still recommend Carrierwave for uploading songs too. It isn't just for images although that's often the most common example. You can have it work with any file type so this is what you'd want.

Posted in Setup Ubuntu 14.04 Trusty Tahr Discussion

Fixing. :)

Posted in Trouble With Form Objects

Does that mean you're able to remove the model_name method?

Posted in Trouble With Form Objects

Another code smell of the real problem is that you're doing

if @invitation.nil?

Which means that you're not creating an Invitation correctly. If you were, you'd be checking if it was valid or not. So you're not running validations and you're not creating the object in memory. There's something else going on here.

Posted in Trouble With Form Objects

Why does ActiveModel not automatically define this for you? The method is thrown on an instance of ActionController::Parameters which is what the params hash is, right? Are you sure you're instanciating the new model instance in the controller correctly?

Posted in Using Vagrant for Rails Development Discussion

You'll have to swap the MySQL instructions with Postgres ones. This tells Chef how to setup a MySQL server inside the Vagrant box, so you'll need to do the same for Postgres. I'm not sure of all the differences off the top of my head but a quick google search for postgres + chef should find you exactly whaty ou need.

Posted in Setup MacOS 10.10 Yosemite Discussion

Yeah, you may run into a few problems, but upgrading Homebrew and possibly a recompile or two and you won't have hardly any troubles. I updated my Macbook Air during the beta and didn't have hardly any trouble.

Posted in Setup Ubuntu 14.04 Trusty Tahr Discussion

If you set this up remotely, you need to manually run the rails server in an SSH connection and then visit the server IP with the port of 3000. So http://SERVER_IP:3000

A better thing to follow for AWS is the deploy tutorial where your Rails apps are hosted on something remote like AWS or Digital Ocean. It uses Nginx & Passenger so that your Rails apps are always running.

I just updated the notes to include the link to the Github project but it's here too! https://github.com/excid3/g...

Posted in Forum Series Part 2: Routes Discussion

I did actually. I ended up deciding to leave out a few pieces because they were ending up making the episodes really long without a lot of useful/interesting things.

Instead, I decided to put everything up on the Github repo so it you can still review those parts! https://github.com/excid3/g...

Posted in How do I communicate if I won't hit an estimate?

I think aside from the suggestions mentioned in that thread, the topic of estimations is important to have a conversation on. Over time, I've learned that if I estimate X hours to complete a project with my gut feeling, the actual amount of time I will spend is between 2-3x what I feel like. Therefore, I always give the clients the estimate of 3x my initial gut feeling. It adds in some safe padding being at the high end in case I totally misinterpreted something plus it also gives me a good bit of freedom to impress the client if I'm actually on the lower end.

Your multipliers will vary and you'll have to make estimates and measure the actual results over many projects to feel out where you naturally judge. As time goes, you'll get better at this and you'll have attempted certain pieces of the project enough times to know almost exactly how long they'll take which reduces the overall fragility of your estimations.

Posted in Using Vagrant for Rails Development Discussion

That's a good question. I think it downloads the primary image once and clones it for each project. You should be able to run "ls -la" to determine the directory size and see just how much it's taking up. I'd guess it's a couple GB for each project.

For personal projects, Vagrant isn't really necessary so I wouldn't really say you need it for that. Mostly just like team environments like you mentioned.

I'd guess there is a way of sharing the Vagrant VM, but I'm not sure off the top of my head.

Posted in Using Vagrant for Rails Development Discussion

The goal is really to use a separate Vagrant box for each project. The reason for that is that each time you can be sure you have everything separated out nicely and you can trust that you don't have some accidental dependencies you forgot about it or weren't aware of.

Posted in Setup MacOS 10.9 Mavericks Discussion

SSH does get pretty cumbersome when you've got a bunch of different keys. Here's some ideas on how to make it better: http://stackoverflow.com/qu...

Posted in Forum Series Part 4: div_for Discussion

Oh sweet. I remember seeing dom_id before but absolutely forgot about it!

Posted in Setup Ubuntu 14.04 Trusty Tahr Discussion

That's what will happen if you missed the echo lines to write that code into your ~/.bashrc file. Without those lines, it won't load your ruby environment so they're important!

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

© 2024 GoRails, LLC. All rights reserved.