hi steve, did you ever find a solution or determine the root of this problem? i'm having the same issue running rails 4 and thin on OS X 10.6.8 in development...
for those who are experiencing the error, "ERROR: Rack::Utils::OkJson::Error: cannot encode Symbol", i suggest using the taps-taps gem instead of just "taps." that's the only changed i had to make to get taps to work (it appears taps is incompatible with rack 1.5, but i can't say for sure). thanks to the following resource for solving the problem.
Depending on how custom you need the JSON, RABL or JBuilder are still used. I prefer JBuilder as it's a little bit more flexible for my needs. I needed custom keys that didn't depend on the model name. If however, you just want a simple data structure with model-name-based keys, then you should use ActiveModel Serializers
I just got the same error, on Capistrano 2.15. Looking back through my shell history, during the automatic ssh login I fat-fingered the command and so that wasn't working correctly either.
If this is the case for you, just redo that automatic login step and then retry cap deploy:setup once you have it working.
Mike, did you get this to work with Capistrano 3.0 or did you use 2.15? If so, would you mind pasting the code? I'm also using Ubuntu 13.04 on a DigitalOcean VPS. I'm getting this error after cap deploy:setup. I tried downgrading to Capistrano 2.15.5 and continued to get the same error.
connection failed for: 123.456.789.000 (Net::SSH::AuthenticationFailed: Authentication failed for user ...)
If you're having a problem where the theme's prompt isn't displaying correctly, just check you haven't brought in an errant PS1 prompt from your .bash_profile (or elsewhere)
...so the html() code WAS working right, but it's really calling .append(). Probably clearer to just use append().
(there's a big advantage to appending the element, rather than just the html from it by doing basically .html(...el.html()) : the @el object can be changed in the future in the js code, and we don't need to bother #container again.)
I don't want to use any gem for authorization
so can you please help me out to use this particular authorization technique when we have multiple roles for the user.
You missed the point of the percentages, since you are rolling out a feature you want to set an initial set of users that are allowed to use that feature, then as you see it is working well you would increase the percentage. This way the original users who were included in the feature would not suddenly see it go away, and would be included as you increased the percentage.
Make sure that if you are using devise with a locale field like so:
User Locale
I18n.locale = current_user.locale
It important to check if current_user is nil before setting the locale. If you're using devise, placing this code in your application controller without checking will cause not-logged in user's pages to crash.
Thanks for tutorial. I did infinite scrolling for my Art Asian site. However, when I go to a product page, then hit back button, it not keep same content and position. Is there any plugin to do that same as Pinterest or Polyvore
I just thought it's worth noting that the API has changed and rightly so, since the implementation of asynchronous calls by bang method clashed in projects that have used bang methods heavily .
I am humbled by how simple the implementation ended up to add some very complex functionality, simply invoked I think that this is the best episode you have on this site. I await your return, eagerly- don't Why out on us!
I had the same issue. I found that I needed to do the # ssh setup steps before I attempted cap deploy:setup. In the video, the ssh is done after and appears to be convenience only but in the show notes its before.
I did try that but it didn't work and I found it difficult to figure out what was going wrong.. killed the droplet and started from scratch with an empty ubuntu image.
Hey guys.
The server is not available (or you do not have permissions to access it)
this error always happens when I run any command related to god.
god status
god start
can someone help me?
Thanks
I recently wrote an article about how to set up Angular in Rails, making Karma aware of the assets pipeline.
The magic is basically in a rake task:
with the karma configuration being:
More info: http://sebastien.saunier.me/blog/2014/02/04/angular--rails-with-no-fuss.html
Thank you so much SimplizIT. That was very helpful. Please keep it up.
In this approach, the searching is case-sensitive, how can i make that case-insensitive?
Also, i need to search the text in multiple fields using where clause and or operation in MongoDB. How can i do that?
Thank you this was very helpful
http://blog.yangtheman.com/2012/02/09/facebook-connect-with-rails-omniauth-devise/
Make sure you add image or whatever you added in the migration to your params in whatever controller you added it to.
hi steve, did you ever find a solution or determine the root of this problem? i'm having the same issue running rails 4 and thin on OS X 10.6.8 in development...
Adding the stop callback to the paintings.js.coffee file worked for me.
same problem :-(
Did you find a solution yet?
How can I deal with locales regarding form objects?
My labels and error messages don't use what's defined in the YAML like they do with normal active record models.
I would really like some input on this, since to work around it I had to bake my own solution and replace every validation with my own.
Well, it took 10 months but I finally got around to creating a gem to do this :)
https://github.com/veloper/zeusd
run
zeusd restart --block
in your pre block and enjoy!for those who are experiencing the error, "ERROR: Rack::Utils::OkJson::Error: cannot encode Symbol", i suggest using the taps-taps gem instead of just "taps." that's the only changed i had to make to get taps to work (it appears taps is incompatible with rack 1.5, but i can't say for sure). thanks to the following resource for solving the problem.
https://shellycloud.com/blog/2013/10/easy-database-migration-using-taps
http://goo.gl/WOL2C5
small article about migration
Depending on how custom you need the JSON, RABL or JBuilder are still used. I prefer JBuilder as it's a little bit more flexible for my needs. I needed custom keys that didn't depend on the model name. If however, you just want a simple data structure with model-name-based keys, then you should use ActiveModel Serializers
I just got the same error, on Capistrano 2.15. Looking back through my shell history, during the automatic ssh login I fat-fingered the command and so that wasn't working correctly either.
If this is the case for you, just redo that automatic login step and then retry
cap deploy:setup
once you have it working.When you guys move on to Rails 4, use
puts "friendly_id :foo, use: [:slugged, :finders]"
puts "friendly_id :foo, use: :slugged"
For anyone wondering, this can now be accomplished by typing
passenger start
from the root of your application.Mike, did you get this to work with Capistrano 3.0 or did you use 2.15? If so, would you mind pasting the code? I'm also using Ubuntu 13.04 on a DigitalOcean VPS. I'm getting this error after cap deploy:setup. I tried downgrading to Capistrano 2.15.5 and continued to get the same error.
connection failed for: 123.456.789.000 (Net::SSH::AuthenticationFailed: Authentication failed for user ...)
This is a modified version I've used for projects that have multiple connections
Thank you very much! Ill do that!
+1
Thanks!!
then you'll probably need to create the file:
No promises that that works, but hopefully it supplies some instant gratification.
You'd be better off looking through some tutorials though if you don't understand the errors you're getting.
http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
^ is overkill for newbies, but I haven't found a more gentle learning source
I'm seeing this behavior as well.
Hello. Newbie here.
I cant get the http://localhost:3000/users view to show properly. I get served a:
Unknown action
The action 'index' could not be found for UsersController
Any hints to as what I am doing wrong?
greatfull for any input.
I found a admin interface for queue classic.
https://github.com/rainforestapp/queue_classic_admin
If you're having a problem where the theme's prompt isn't displaying correctly, just check you haven't brought in an errant PS1 prompt from your .bash_profile (or elsewhere)
I have found this alternative:
https://github.com/kalkov/rails4_client_side_validations
figured out why calling html() with an element object works at all:
http://jamesallardice.com/passing-an-element-or-object-to-the-jquery-html-method/
...so the html() code WAS working right, but it's really calling .append(). Probably clearer to just use append().
(there's a big advantage to appending the element, rather than just the html from it by doing basically .html(...el.html()) : the @el object can be changed in the future in the js code, and we don't need to bother #container again.)
also, this was keeping me from getting that reset callback:
http://stackoverflow.com/questions/15603107/backbone-collection-fetch-doesnt-fire-reset
I don't want to use any gem for authorization
so can you please help me out to use this particular authorization technique when we have multiple roles for the user.
I want to use it on rails 4
Absolutely amazing screencast. I keep discovering new things I didn't know every time I watch it.
You missed the point of the percentages, since you are rolling out a feature you want to set an initial set of users that are allowed to use that feature, then as you see it is working well you would increase the percentage. This way the original users who were included in the feature would not suddenly see it go away, and would be included as you increased the percentage.
Make sure that if you are using devise with a locale field like so:
It important to check if current_user is nil before setting the locale. If you're using devise, placing this code in your application controller without checking will cause not-logged in user's pages to crash.
I've just spend about an hour to find that out - finally, thanks to your hint, I did^^
Thanks for tutorial. I did infinite scrolling for my Art Asian site. However, when I go to a product page, then hit back button, it not keep same content and position. Is there any plugin to do that same as Pinterest or Polyvore
I just thought it's worth noting that the API has changed and rightly so, since the implementation of asynchronous calls by bang method clashed in projects that have used bang methods heavily .
https://github.com/celluloid/celluloid/commit/946eeb81
I am humbled by how simple the implementation ended up to add some very complex functionality, simply invoked I think that this is the best episode you have on this site. I await your return, eagerly- don't Why out on us!
Has anyone figured out a way to do this with accepts_nested_attributes_for
Thank you!
Is this current best practice or is https://github.com/rails-api/active_model_serializers the way to go these days?
I had the same issue. I found that I needed to do the # ssh setup steps before I attempted cap deploy:setup. In the video, the ssh is done after and appears to be convenience only but in the show notes its before.
Para los que estan trabajando con la version 3.2.13 de Rails se debe modificar lo siguiente en el archivo "application.js"
Dice:
function remove_fields(link) {
$(link).previous("input[type=hidden]").value = "1";
$(link).up(".fields").hide();
}
Debe decir:
function remove_fields(link) {
$(link).prev("input[type=hidden]").val("1");
$(link).closest(".fields").hide();
}
I'd also like to see an update, as I think the block/yield behaviour changed a lot since the video?
-- http://railscasts.com/episodes/208-erb-blocks-in-rails-3?view=asciicast
+1
I did try that but it didn't work and I found it difficult to figure out what was going wrong.. killed the droplet and started from scratch with an empty ubuntu image.
Hey guys.
The server is not available (or you do not have permissions to access it)
this error always happens when I run any command related to god.
god status
god start
can someone help me?
Thanks
I think there should be a revision that uses Capistrano 3 instead, as all the commands and config files have been updated
Great question. I was just about to ask the same
pls how do i use this to create a profile for my users....email me @ dehinde007@gmail.com