Ryan, can you shed any light on how you would go about using Doorkeeper (or something similar) to implement separate authorization and resource servers? I'm trying to build one authorization server that can handle oAuth2 for all of our resource servers (instead of trying to implement the authorization server on each of those endpoints). It seems like Doorkeeper is designed for the scenario where the resource and authorization servers are one in the same.
$('#call_region_id').change ->
region = $('#call_region_id :selected').text()
options = $(facilities).filter("optgroup[label=#{region}]").html()
if options
$('#call_transfer_from_id').html(options)
else
$('#call_transfer_from_id').html($(options).attr('selected',true))
This works fine when changing the region. But when I need to edit the record and the form loads and I want to change the facility, all facilities are listed grouped by region whereas I'd like to have it constrain the facilities on page load. How can I combine .change and on load or document ready within this function so when I edit a record and the page loads I only see the facilities specific to that region?
You are correct, Heroku requires a separate worker dyno to launch background jobs.
You can use the Workless gem, which creates and kills a worker when DelayedJob is called. Heroku will only bill you the uptime ($0.05/h), not the full $35/m.
Just wanted to thank you for this even after 6 months. My main problem was the data not persisting and I finally looked at the console to see that it was an issue not having csrf-tokens.
This is not an error from the doc. Indeed, "require_tree ." means that the manifest requires the file dans the subfiles (the "tree") in the current directory (the "." means current directory).
And the lib and vendor directories aren't subdirectories of the current directory.
So your way to do it is good ;)
entering dummy card number 4111111111111111 and cvv 123 solved the following issue for me:
Stripe error while creating customer: You passed an empty string for 'card'. We
assume empty values are an attempt to unset a parameter; however 'card' cannot b
e unset. You should remove 'card' from your request or supply a non-empty value
I have a doubt here. I have a profile model that has two image fields. Do I need to create two uploaders, one for each image field ? I can get this to work with carrierwave direct. Can anyone help me please ?
Is it even sure that one has an perfomance plus from memcache in comparison to filecache store, if one has loads of RAM (40..45GB spare for caching) and Linux' disk cache strategy already putting files in RAM?
Having conflicts between current controllers and active admin controllers.. when I sing in both admin section and normal sections, public activity is taking normal section current user though I updated through admin section.
What might have been obvious to some but was not to me was the necessity to pay on Heroku a worker (35$) to have the queue taken care of if I'm not mistaken.
Ahaa! I am having exactly this problem (that future ajax submits cause duplicate records) - what exactly do you mean by "get that id back from the server and add that hidden input"? What command would I use to pull the id? And would I add that input into the form?
Error while processing route: entries undefined is not a function TypeError: undefined is not a function at RandomRaffle.EntriesRoute.Ember.Route.extend.setupController
and
undefined is not a function TypeError: undefined is not a function
at RandomRaffle.EntriesRoute.Ember.Route.extend.setupController
when I add RandomRaffle.Entry.find() to my routes. Any ideas?
Thanks for the video! I'm using Rails 4.1 and still found this to be very helpful with a few tweaks. I used the Gem instead of the plugin recommendation.
Put this in the for what it's worth category, for Postgresql, the rails g migration add_omniauth_to_users provider uid should be rails g migration add_omniauth_to_users provider uid:integer otherwise I was getting a Error: operator does not exist: character varying = integer.
I had to put several casts together to get an API providing OAuth2, and a devise client to use it with Omniauth, but good job putting the important bits out there.
Could anyone managed to make this work?
I need to implement live update in a new project. I updated the source code provided with this railscast to work with rails 4 but it doesn't.
Seems like the javascript isn't triggered when a message comes in
Has anyone had any success getting this to work on Heroku? I have it set up, along with redis-cloud, and am able to get pub/sub working, but I need some advice on how to set up my pool size and puma threads...I very quickly reach the connection limit on the free tier of my redis-cloud account as well. Hoping someone has some experience with this.
For some reason I never connect to the database. Verified that it was populated withe seed data. However the seed data never displays neither is any input added. Any suggestions?
I read the GitHub issue comment about the deprecation of the border-radius mixin. With Bourbon 3.0 you should use the standard CSS border-radius: 6px;.
This doesn't seem to work at all - file download or not. No matter what I do - even with the most basic example 100% identical to the shown source code - I get a "can’t be opened" error with Numbers (have not tried with windows). Just going to have to find a different solution entirely.
HI
http://binaryhash.wordpress.com/2014/06/20/how-to-setup-secured-ssl-on-nginx/
I posted one SSL setup with nginx
May it will be helpful
if any question you ask me
Simple File Upload using Amazon CORS support with progress bar
Ryan, can you shed any light on how you would go about using Doorkeeper (or something similar) to implement separate authorization and resource servers? I'm trying to build one authorization server that can handle oAuth2 for all of our resource servers (instead of trying to implement the authorization server on each of those endpoints). It seems like Doorkeeper is designed for the scenario where the resource and authorization servers are one in the same.
Awesome video and awesome service btw.
Friggin sweet.
amazing!
In rails 4 using "view_context" works. Thank you.
I have implemented this using the following:
jQuery ->
facilities = $('#call_transfer_from_id').html()
$('#call_region_id').change ->
region = $('#call_region_id :selected').text()
options = $(facilities).filter("optgroup[label=#{region}]").html()
This works fine when changing the region. But when I need to edit the record and the form loads and I want to change the facility, all facilities are listed grouped by region whereas I'd like to have it constrain the facilities on page load. How can I combine .change and on load or document ready within this function so when I edit a record and the page loads I only see the facilities specific to that region?
I don't like this approach and prefere to use Mercury Editor which you've showed in this railscast: http://railscasts.com/episodes/296-mercury-editor
+1
+1
This blog post compares Grape and rails-api performance: http://blog.backupify.com/2013/09/30/a-framework-comparison-of-grape-vs-railsapi-part-1-performance/
Hey
$ ruby -v
ruby 2.0.0p481
$ rails -v
Rails 4.1.5
I got some problem with
When I tryed to do a update, It leaved :tags out. It is becaus it expect a sting, not a array
This is the fix
You are correct, Heroku requires a separate worker dyno to launch background jobs.
You can use the Workless gem, which creates and kills a worker when DelayedJob is called. Heroku will only bill you the uptime ($0.05/h), not the full $35/m.
After a lot of trouble shooting, I am stuck in this error, any ideas how to fix it?
** [out :: production.foo.com] Version '1:4.0.48-1~precise1' for 'libapache2-mod-passenger' was not found
** [out :: production.foo.com]
command finished in 4405ms
failed: "/bin/bash -l -c 'sudo -p '\''sudo password: '\'' bash -l /tmp/install_packages postfix build-essential git-core libxslt-dev ntp postgresql-client libpq-dev subversion curl autoconf bison ruby zlib1g-dev libssl-dev libreadline6-dev libxml2-dev libyaml-dev apache2 libapache2-mod-proxy-html libcurl4-openssl-dev libapache2-mod-xsendfile apache2-mpm-prefork apache2-prefork-dev libapache2-mod-passenger=1:4.0.48-1~
lsb_release -sc
1 collectd libperl-dev monit postgresql-9.1 openjdk-7-jdk unzip python-django python-django-tagging python-cairo python-memcache memcached uwsgi uwsgi-plugin-python uwsgi-core sqlite3 bzr zip mongodb-10gen haproxy ec2-ami-tools'" on production.foo.comI tried running gem install passenger but didnt fix it. Help please!
Thank you for your solution!
Cropper.rb have class Cropper < Thumbnail
so
processors => [:cropper, :thumbnail].
This code works perfect.
Just wanted to thank you for this even after 6 months. My main problem was the data not persisting and I finally looked at the console to see that it was an issue not having csrf-tokens.
This is not an error from the doc. Indeed, "require_tree ." means that the manifest requires the file dans the subfiles (the "tree") in the current directory (the "." means current directory).
And the lib and vendor directories aren't subdirectories of the current directory.
So your way to do it is good ;)
entering dummy card number 4111111111111111 and cvv 123 solved the following issue for me:
Stripe error while creating customer: You passed an empty string for 'card'. We
assume empty values are an attempt to unset a parameter; however 'card' cannot b
e unset. You should remove 'card' from your request or supply a non-empty value
This might be helpful if you get a rvm error with pow.
http://stackoverflow.com/questions/20199970/bundlerrubyversionmismatch-your-ruby-version-is-1-9-3-but-your-gemfile-speci
I have a doubt here. I have a profile model that has two image fields. Do I need to create two uploaders, one for each image field ? I can get this to work with carrierwave direct. Can anyone help me please ?
Thanks Man! This is what I was looking for one of my projects... :)
Great example! Is there a way to control macros in xls files?
Quite Interesting! :)
provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_SECRET']
how to assign the values to facebook appid and facebook secret
plz let me know
thanks
Deprecated in Rails 2.3.8
See Daily Ruby Tips
I have documented How to Install Alpha SSL certificate using Moonshine for Rails 4.1
+1. Thanks!
Pjax library has changed
First you have to call the new pjax function like this in the coffeescript file:
$(document).pjax('a[data-pjax]', '#pjax-container')
Notice that the div container is now a normal div with an id "pjax-container"
Is it even sure that one has an perfomance plus from memcache in comparison to filecache store, if one has loads of RAM (40..45GB spare for caching) and Linux' disk cache strategy already putting files in RAM?
Having conflicts between current controllers and active admin controllers.. when I sing in both admin section and normal sections, public activity is taking normal section current user though I updated through admin section.
How to fix this
I configured my model with tracke like the following ..
tracked owner: ->(controller, model) { controller && controller.current_user}
and when I try to update my model from admin section (I am using active admin) , it does not update current user as owner in the database .
I found the issues is controller is having nil value. how to fix this issue
Can I use render_activities(@activities) in rabl to display json content, otherwise any approach of rendering activities in json format
Hi all,
What might have been obvious to some but was not to me was the necessity to pay on Heroku a worker (35$) to have the queue taken care of if I'm not mistaken.
https://devcenter.heroku.com/articles/delayed-job
Best
Nicolas
when i rake db:migrate, it does not work, nothing happens
Mocking a third party API is a very bad practice. However you can replace the mock with stub and raise the exception.
Ahaa! I am having exactly this problem (that future ajax submits cause duplicate records) - what exactly do you mean by "get that id back from the server and add that hidden input"? What command would I use to pull the id? And would I add that input into the form?
Receiving console error:
Error while processing route: entries undefined is not a function TypeError: undefined is not a function at RandomRaffle.EntriesRoute.Ember.Route.extend.setupController
and
undefined is not a function TypeError: undefined is not a function
at RandomRaffle.EntriesRoute.Ember.Route.extend.setupController
when I add RandomRaffle.Entry.find() to my routes. Any ideas?
I am having the same issue! Could you elaborate further on how you solved it?
Thanks for the video! I'm using Rails 4.1 and still found this to be very helpful with a few tweaks. I used the Gem instead of the plugin recommendation.
Put this in the for what it's worth category, for Postgresql, the
rails g migration add_omniauth_to_users provider uid
should berails g migration add_omniauth_to_users provider uid:integer
otherwise I was getting aError: operator does not exist: character varying = integer
.I had to put several casts together to get an API providing OAuth2, and a devise client to use it with Omniauth, but good job putting the important bits out there.
Could anyone managed to make this work?
I need to implement live update in a new project. I updated the source code provided with this railscast to work with rails 4 but it doesn't.
Seems like the javascript isn't triggered when a message comes in
One comment: the
persisted?
public instance method defaults to returnfalse
.Can someone help me with this?
Extracted source (around line #3):
/app/models/product.rb:17: syntax error, unexpected $end, expecting keyword_end
class ProductsController < ApplicationController
def index
3 @products = Product.order(:name)
respond_to do |format|
format.html
format.csv { send_data @products.to_csv }
I had a similar experience, maybe this answer can help you? http://stackoverflow.com/questions/23579808/406-not-acceptable-in-rails-4-with-angularjs
Thank you Dave that sorted out my ongoing problem
Has anyone had any success getting this to work on Heroku? I have it set up, along with redis-cloud, and am able to get pub/sub working, but I need some advice on how to set up my pool size and puma threads...I very quickly reach the connection limit on the free tier of my redis-cloud account as well. Hoping someone has some experience with this.
would this work with sqlite?
For some reason I never connect to the database. Verified that it was populated withe seed data. However the seed data never displays neither is any input added. Any suggestions?
I read the GitHub issue comment about the deprecation of the
border-radius
mixin. With Bourbon 3.0 you should use the standard CSSborder-radius: 6px;
.This doesn't seem to work at all - file download or not. No matter what I do - even with the most basic example 100% identical to the shown source code - I get a "can’t be opened" error with Numbers (have not tried with windows). Just going to have to find a different solution entirely.