Chris Oliver

Joined

291,280 Experience
86 Lessons Completed
296 Questions Solved

Activity

Posted in Setup Ubuntu 14.04 Trusty Tahr Discussion

The package names have probably changed a bit. You may want to switch to the 13.04 version as it probably has some more similar package versions.

Posted in Button Loading Animations with jQuery UJS Discussion

That's interesting. Do you get any errors in the console that show the browser having trouble loading the icon font by chance?

Posted in A Look Into Routing Discussion

Yes! I forgot to mention that. Thanks for sharing. :)

Posted in Deploy Ubuntu 12.04 Precise Pangolin Discussion

Great post Nick. That will be useful for anyone running into trouble with rvm. I'll be sure to point people that direction if they have issues. :)

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

Depends on what you want to do, but generally Passenger is quite good on all fronts. You can read some more about some performance testing but no matter what, it isn't going to be definitive that one is always better than another. https://blog.engineyard.com...

Posted in Deploy Ubuntu 12.04 Precise Pangolin Discussion

That would be a problem with your nginx config. The IP address doesn't matter, it's okay to serve up on that instead of a domain. You may have changed the config and not restarted nginx or you did and it was invalid and nginx didn't actually load it. Double check that and the /var/log/nginx/error.log file to see if you have anything wrong there.

Posted in jQuery UJS Callbacks Discussion

Thanks David! :)

Posted in User Authentication with Devise | GoRails

Plenty of cases, but most of those revolve around building out a very custom onboarding flow. Most of the time (including OAuth) is handled well enough with Devise.

Posted in jQuery UJS Callbacks Discussion

Hey Vlad and biodiscover, that's totally fair. There are people who have asked to pay and want to support the site. I understand you're not sold yet and there's nothing wrong with that. Everyone's at a different stage in their career, so some people have gotten some valuable insights out of the screencasts so far and other people are further along that they haven't. I'm working my way towards the more advanced content. Hopefully over time I'll be able to earn your support as well! :)

Posted in Setup Ubuntu 14.04 Trusty Tahr Discussion

It seems to be a bug in the new readline dependency. I *think* if you're on the latest patch version of 2.0.0 (p481) that it has a patch for that bug.

Ah I see now. So the stripe button JS takes an amount simply to display the amount. On the backend, you are always submitting charge for the same amount which is why you're seeing that problem.

To solve this, you want to define some "plans" and submit that to the create action along with the stripe card token. You can do that in hidden fields, but you want to do that instead of submitting the amount so users can't submit their own amount which would be a security issue. If you send over the plan name and look up the amount (you can hardcode this into your app), then you can calculate the appropriate price. Does that make more sense?

Posted in Setup MacOS 10.9 Mavericks Discussion

That command is provided by ruby-build. Make sure you didn't miss any of those steps.

That's generally not something you would want to do unless you are talking about AJAX. What are you trying to accomplish?

Posted in Setup Ubuntu 14.04 Trusty Tahr Discussion

Thanks John. That *should* be fixed in Ruby 2.1.2. Is that what you were installing?

Posted in Pretty urls with FriendlyID Discussion

It works fine in Rails 4. From what I can tell, those find_by_COLUMN methods didn't go away, but the ones listed in the README here did: https://github.com/rails/ac...

Posted in Setup MacOS 10.9 Mavericks Discussion

Sounds like you don't have postgres running. Follow the steps in the postgres section again to make sure you got them (especially the launchctl one.)

Posted in Setup MacOS 10.9 Mavericks Discussion

Change your config/database.yml to look like this:

development:
adapter: postgresql
host: 127.0.0.1
database: myapp_dev
username: YOUR_POSTGRES_USER

Rename the database to whatever you want to call your app's database and also make sure to change your postgres username to your username. And last, but not least, make sure postgres is running.

Posted in Setup MacOS 10.9 Mavericks Discussion

Try specifying the "host: 127.0.0.1" option so it doesn't try to connect through the socket.

Posted in jQuery UJS and AJAX Discussion

If you create a partial to render the list of articles, you can do that easily with this. If you have a div that contains all the articles:

<div id="articles"></div>

You can create a link to load them:

<%= link_to "Load Articles", articles_path, remote: true %>

And then your articles.js.erb can insert them into the page:

$("#articles").append("<%= escape_javascript(render partial: "articles") %>");

That would render the _articles.html.erb partial, insert it into the JS response, and then when it gets executed, it will add it to the end of the #articles div.

Make sense?

Posted in Using Vagrant for Rails Development Discussion

Most definitely!