If you only run a single server, you have to use a third-party service to monitor your server. Because if your server goes down, Monit will go down with it.
Thanks Ryan.
I was able to implement this in seconds :), however it doesn't render properly with users with missing Gravatars. Gravatar api has built in default image options for this scenario. See (http://en.gravatar.com/site/implement/images).
To use these options, just pass one of the following keywords as the d= parameter to an image request: 404, identicon, monsterid, wavatar, retro, blank.
Hi,
Im pretty new to Rails, and Im using Cocoon.
I would like to know if instead of setting the association to 'people', I could somehow get an specific one, like Person.find(id) when using link_to_add_association
Hy all, i have installed delayed_job gem,
I have an rails app qith mongoid, and the gem save correctly the queue in mongodb (db.delayed_backend_mongoid_jobs), but not exectue the queue command, why?
In case of unsuccessful update action, all fields that were marked for removing (_destroy = true) will be shown again.
To hide them you can use something like this:
Old problem, but I was working on a similar problem. I solved it by using the "area" gem, and converting the zip code (passed as string) into a lat/long pair.
I have this empty card error as well
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
In case it helps anyone, I was running into the same error, and it turned out that I had made a typo in the script. I referred to the 'xkey' option as 'xkeys' which is not valid. Once I fixed that and reload the page, the demo graph showed.
This is great! I was able to take the controller from option 2 and combine it with the wice_grid gem to quickly put together a grid featuring inline editing without any client-side script at all. As a newbie to Rails, I expected to be fiddling around for hours. Easy-peasy!
I couldn't figure out for the life of me why current_user was returning nil with the new cookies authentication. I was using an old user for which there had been no auth token generated... if anyone else encounters the same there ya go. Make a new user or clear the db.
I am running Excel 2007 and the XLS/XML format described in this Railscast doesn't work. I copied it over carefully. Excel 2007 just says that there's something wrong with the "Table" format but doesn't tell me what. It says to see a log file in a long path name it gives me for the details, but that path doesn't even exist (thanks Microsoft). Has anyone gotten an XLS format to work on Windows?
If you want to use Twitter authentication in https://teatro.io/ first create special stage application in Twitter and then set domain as project-token.ttrcloud.com and authentication urls as http://project-token.ttrcloud.com. It will work on any branch of this project.
If you want to use Facebook authentication in https://teatro.io/ first create special stage application in Facebook and then set domain as project-token.ttrcloud.com and authentication urls as http://project-token.ttrcloud.com. It will work on any branch of this project.
Mr. Ryan Bates, may you please revisit this topic with a Rails4Ruby2-compatible solution, establishing strong parameters (without accessible_attributes) and up-to-date methods (without deprecated .save! method). Thank you in advance. Much appreciated!
Otherwise, at .save! position, I keep getting the following error: "Validation failed: User can't be blank, Content can't be blank"
If I change to .save, then everything goes through without errors, but NOTHING gets saved, since I have a table placed right under my Import button and there are no new entries visible. Also, PGAdmin Database entries confirm that nothing gets stored. Please help!
This is a very interesting technique. I love seeing new ideas for how middleware can be used. This suites the online/offline problem very well. I didn't use this for my bulk/batch API personally because I needed to better tune performance, but I can see how this could be very useful. Thanks, Ryan.
I just added the squeel gem to the Gemfile in my project, did a bundle install and it installed without a problem. I then tried to use it with a very simple query like this:
InsertionOrder.where{id = 1}
in a controller and got
ArgumentError: wrong number of arguments (0 for 1+)
I tried the same query and many variations in the rails console and still got the same error.
InsertionOrder.where(id: 1) works just fine.
I saw that patrick above says restarting his session helped but it has for me on many restarts.
I've tried using several other operators and tried putting the expression in parentheses, but with no change in result.
I Tried doing the rake initialization to make the squeel.rb config file in case that would help but it didn't.
@SeanO looks like that route doesn't exist, if you're trying to #create a user, try posting to the users_path in your form, or use form_for(user_obj) to automatically pick the route like:
ruby
<%= form_for(@user) do |f| %>
I'd suggest the above, as long as you're creating @user = User.new in the users#new controller action, so it knows to route to POST /users. The long way to write it is:
The RailsApps project has a Rails 4.1 rails-omniauth example application with an in-depth OmniAuth Tutorial.
The RailsApps project has a Rails 4.1 rails-omniauth example application with an in-depth OmniAuth Tutorial.
The RailsApps project has a Rails 4.1 rails-omniauth example application with an in-depth OmniAuth Tutorial.
+1
Great idea; works very well, is elegant and is set at the right places.
If you only run a single server, you have to use a third-party service to monitor your server. Because if your server goes down, Monit will go down with it.
Here is an excellent article on monitoring : Monitoring and Maintaining Your Server
Did you find any solution to this problem?
Thanks Ryan.
I was able to implement this in seconds :), however it doesn't render properly with users with missing Gravatars. Gravatar api has built in default image options for this scenario. See (http://en.gravatar.com/site/implement/images).
To use these options, just pass one of the following keywords as the d= parameter to an image request: 404, identicon, monsterid, wavatar, retro, blank.
I keep getting this error. There is no unicorn.sock file in that dir so I'm guessing that it's just not getting created?
The answer for me was to add
listen "/tmp/unicorn.sock"
to my unicorn.rb file.
Hi,
Im pretty new to Rails, and Im using Cocoon.
I would like to know if instead of setting the association to 'people', I could somehow get an specific one, like Person.find(id) when using link_to_add_association
I'm having a problem with many browsers opening the file instead of downloading it.
The best solution so far has been to use send_data and set ' disposition: "attachment; filename=A_COOL_TITLE" instead
I also found that turbo-link can cause issues so I added 'data-no-turbolink' => true to the download link
It works perhaps if you use text method of jquery object :
Hy all, i have installed delayed_job gem,
I have an rails app qith mongoid, and the gem save correctly the queue in mongodb (db.delayed_backend_mongoid_jobs), but not exectue the queue command, why?
I know it's 2 years later, but thank you for this! Huge help just now!
Got it working, great video! but how can I get the id of the record in a hidden field?
helped a lot...
In case of unsuccessful update action, all fields that were marked for removing (_destroy = true) will be shown again.
To hide them you can use something like this:
Great video as ever - one of the changes in current TS is the indices are no longer stored in the models. http://pat.github.io/thinking-sphinx/quickstart.html
Old problem, but I was working on a similar problem. I solved it by using the "area" gem, and converting the zip code (passed as string) into a lat/long pair.
Hi
Could you please share how you solved it? I have the same problem ie save additional field in join table.
Thanks
It's fixed just update the stripe version to v2 from v1 in the layout files or wherever you have included it.
I have this empty card error as well
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
You're my dude Bates
In case it helps anyone, I was running into the same error, and it turned out that I had made a typo in the script. I referred to the 'xkey' option as 'xkeys' which is not valid. Once I fixed that and reload the page, the demo graph showed.
I think this can be resolved with default scopes? If you want your
Picture
to include:comments
and yourSpreadsheet
to include:collaborators
:... and if you didn't want to include somewhere, use something like
Picture.all.unscoped
Paul,
I know this is an old post, did you ever find a solution to this? I'm trying to do the same thing.
I need help.
I am getting nil form value. I am getting error: undefined method `q=' for nil:NilClass
Thanks in advance!
Great screencast Thanks Ryan !!!
Did anyone get the saving to work? My search works fine but I can't insert anything to my join table. Sample please!
Did you manage to figure this out? I am trying to do exactly the same.
This is great! I was able to take the controller from option 2 and combine it with the wice_grid gem to quickly put together a grid featuring inline editing without any client-side script at all. As a newbie to Rails, I expected to be fiddling around for hours. Easy-peasy!
What did you end up using if you don't mind me asking?
add this line to your config
openssl_verify_mode: 'none'
Thanks, this did the trick!
I couldn't figure out for the life of me why current_user was returning nil with the new cookies authentication. I was using an old user for which there had been no auth token generated... if anyone else encounters the same there ya go. Make a new user or clear the db.
Just in case anyone is getting a undefined method error for find_or_create_by_provider_and_uid in Rails 4, this code works:
current_user.authentications.find_or_create_by(:provider => auth['provider'],
:uid => auth['uid'])
Oh nvm, operator error on my part. I actually does work, but does show a warning message up front.
I am running Excel 2007 and the XLS/XML format described in this Railscast doesn't work. I copied it over carefully. Excel 2007 just says that there's something wrong with the "Table" format but doesn't tell me what. It says to see a log file in a long path name it gives me for the details, but that path doesn't even exist (thanks Microsoft). Has anyone gotten an XLS format to work on Windows?
If you want to use Twitter authentication in https://teatro.io/ first create special stage application in Twitter and then set domain as project-token.ttrcloud.com and authentication urls as http://project-token.ttrcloud.com. It will work on any branch of this project.
If you want to use Facebook authentication in https://teatro.io/ first create special stage application in Facebook and then set domain as project-token.ttrcloud.com and authentication urls as http://project-token.ttrcloud.com. It will work on any branch of this project.
Mr. Ryan Bates, may you please revisit this topic with a Rails4Ruby2-compatible solution, establishing strong parameters (without accessible_attributes) and up-to-date methods (without deprecated .save! method). Thank you in advance. Much appreciated!
Otherwise, at .save! position, I keep getting the following error: "Validation failed: User can't be blank, Content can't be blank"
If I change to .save, then everything goes through without errors, but NOTHING gets saved, since I have a table placed right under my Import button and there are no new entries visible. Also, PGAdmin Database entries confirm that nothing gets stored. Please help!
Very late but someone may benefit from this.
You need to add :group_ids to your user model:
Orban, try this out http://brewhouse.io/blog/2014/04/30/gourmet-service-objects.html
This is a very interesting technique. I love seeing new ideas for how middleware can be used. This suites the online/offline problem very well. I didn't use this for my bulk/batch API personally because I needed to better tune performance, but I can see how this could be very useful. Thanks, Ryan.
Ah.
zeus.json
. Got it.How did you solve this? I am having exactly the same issue.
I just added the squeel gem to the Gemfile in my project, did a bundle install and it installed without a problem. I then tried to use it with a very simple query like this:
InsertionOrder.where{id = 1}
in a controller and got
ArgumentError: wrong number of arguments (0 for 1+)
I tried the same query and many variations in the rails console and still got the same error.
InsertionOrder.where(id: 1) works just fine.
I saw that patrick above says restarting his session helped but it has for me on many restarts.
I've tried using several other operators and tried putting the expression in parentheses, but with no change in result.
I Tried doing the rake initialization to make the squeel.rb config file in case that would help but it didn't.
Any ideas?
Is there a way to filter the options, but still keep a blank option?
Say I have Publisher, Series and Game selects. But if there is only one Series, then the .change -> will never get triggered for Game.
@SeanO looks like that route doesn't exist, if you're trying to #create a user, try posting to the
users_path
in your form, or useform_for(user_obj)
to automatically pick the route like:<%= form_for(@user) do |f| %>
I'd suggest the above, as long as you're creating
@user = User.new
in theusers#new
controller action, so it knows to route toPOST /users
. The long way to write it is:<%= form_for @user, as: :post, url: users_path %>
If you want to use sidekiq in https://teatro.io/ you need to create
Procfile
like this: