Chris Oliver

Joined

290,710 Experience
86 Lessons Completed
298 Questions Solved

Activity

Posted in Setup MacOS 10.10 Yosemite Discussion

Your best bet is to probably try following these steps. Homebrew should take care of getting everything installed properly for you.

Interesting. I can't think of much except for maybe having a typo somewhere.

Posted in Comments With Polymorphic Associations Discussion

Since they are reads, I think that so long as your database server can handle it, it doesn't matter how many connections read from the same table. Reads don't lock the table/row like writes do since a read cannot cause data loss. You shouldn't experience any loss of speed if many things are reading the same table.

Posted in Subdomains

Hey Jon,

Not yet! I've been busy with the holidays but I plan on starting to cover this in the next week.

Posted in Errors Following the Deploy Rails Tutorial

I'd suggest doing the symlink and using those. Environment variables are harder to configure and secrets.yml was designed specifically to help solve that problem.

Posted in File Uploading with Carrierwave Discussion

Great idea. I don't have a copy yet but I'll do that next episode. It basically is rails new app, install devise, bootstrap-sass and create an application layout that uses bootstrap. Pretty quick / basic and it lets me focus on the topic instead in the videos.

Posted in Wrong Ruby version with Postgres user

So the postgres user I'm talking about is just the database user, not an Ubuntu user named postgres. There is a Ubuntu user with the name of postgres that gets added when you install the database and thats how it restricts permissions to edit the db.

Do you have the error handy for your postgres connection?

Posted in Nginx.conf failed

Thanks for the heads up! I guess they updated their tutorial and I didn't notice.

Awesome, glad you got it figured out!

I believe that can happen with the callback url on Twitter. You might try http://127.0.0.1:3000/ instead of localhost.

Posted in 404 Not Found after deploy to Ubuntu server

When Capistrano deploys your app, it saves a copy of each deploy into releases. When the deploy succeeds, it makes current a link to the latest release so that you can manage and rollback your deploys easily. Your nginx config needs to point to the current/public directory instead because of this so it can find the most recent Rails deploy. Update your nginx conf to this and try restarting nginx.

        root         /home/jk/eyideaIS/current/public;

Posted in Implementing Markdown Support in Forums

Great post. Redcarpet is great and I like that you've got notes for all the different options.

Also check out this episode: https://gorails.com/episodes/markdown-emoji-with-html-pipeline-gem

I really like Redcarpet, but html-pipeline lets you add in your own filters so you can add things like Emoji and build your own for custom things (like maybe you want to detect Youtube URLs and embed them).

Posted in Nginx.conf failed

Interesting. What if you comment out the passenger_root line? Does sudo nginx -t then give you an error on passenger_ruby?

Also, maybe check dpkg to see if the two packages are installed. This is what I get from running dpkg -l nginx and dpkg -l passenger:

$ dpkg -l nginx-full
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version             Architecture        Description
+++-=============================-===================-===================-================================================================
ii  nginx-full                    1:1.6.2-2.4.0.56~tr i386                nginx web/proxy server (standard version)


$ dpkg -l passenger
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version             Architecture        Description
+++-=============================-===================-===================-================================================================
ii  passenger                     1:4.0.56-1~trusty1  i386                Rails and Rack support for Apache2 and Nginx

If so, I'm guessing that maybe the passenger Ubuntu package didn't get installed and maybe only nginx-full.

Posted in video about sortable lists

Doh! That would make a LOT of sense. I need to learn more about how to write my jQuery better for turbolinks support but I always notice things that it caches weird navigation items.

And thanks! We've got a lot of great plans to just keep improving things. :)

Posted in field_for with index

Hmm, what does your javascript look like?

Posted in video about sortable lists

Oh interesting, it definitely could be then. I haven't seen that lib before but that's cool. I like that it works across rows. Stupid that CSS can't do it easily!

Posted in video about sortable lists

Interesting regarding the refresh problem. Your code seems fine, but are there any Javascript errors on the page the first time you load it?

Posted in video about sortable lists

Awesome!! :)

Posted in video about sortable lists

That seems right, but it sounds like your JS is making a POST to the create action. Which means your sort action isn't being called.

Basically this Started POST "/admin/sections" for 127.0.0.1 at 2014-12-19 14:26:28 +0100
Should be Started POST "/admin/sections/sort" for 127.0.0.1 at 2014-12-19 14:26:28 +0100

And there is something causing your JS to POST to the wrong URL.

I think your JS isn't grabbing the update-url attribute because your attribute doesn't match. You've got $(this).data('update_url') in the JS but data-update-url in the view. Data attributes always use dashes, so I'm guessing that this returns a null and it POSTs to the current url which is /admin/sections.

Change that to $(this).data('update-url') and I think you'll be alright. Does that make sense?

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

The goal is not to use passwords for ssh so it is more secure. You'll just need to copy your ssh public key to the deploy user with ssh-copy-id. Double check that you can ssh into deploy without a password so Capistrano can too.