Rails

Here you have the simple step you may follow: Go to your website and create a new user account Go to console [shell] bundle exec rails console [/shell] How to activate your discourse account manually(from console) if you are not receiving the confirmation email: [shell] token = User.last.email_tokens.first EmailToken.confirm(token.token) [/shell] Setup your account as an admin...

Sometimes when you're playing with new code it is kind of difficult to find out where they are declared or maybe this method are declared using metaprogramming and they are not explicitly declared: In most of the cases you can just copy your method or function and search it in the repository using ack http://beyondgrep.com/ or silver searcher(ag) https://github.com/ggreer/the_silver_searcher but if you are not able to find the method you're looking for using some of this searcher tools you can use some gem for debugging for example debugger https://github.com/cldwalker/debugger or pry https://github.com/pry/pry.

Well I'm using heroku.com for staging purposes for one of our Customer projects and I found really useful to clone from time to time the staging db especially when the bugs arise, if you want to do that I'm going to show how to do it using the command line tool or using a rake task you can use whichever you prefer: Before to start with running commands make sure you have the heroku toolbelt installed: https://github.com/heroku/toolbelt

Just for future reference in Spree you can use the following code in spite of authenticate an existent user created in a Spree Store [javascript] var server = 'http://localhost:3000'; var userAuthUrl = server + '/login.js'; var data = {spree_user: {email: "spree@example.com", password: "spree123"}} $.ajax({ type: "POST", data: data, url: userAuthUrl, success: function(data, textStatus, jqXHR) { console.log(data); console.log(textStatus); console.log(jqXHR); } }); [/javascript]

Hello guys I want to share with you about this problems with wrong color or quality for the uploaded images using Paperclip gem, Imagemagick and Heroku.com. The fix that we did it is related with the Imagemagick configuration and updates in order to fix this problem you have to do the following actions: First you have to set a new environment variables on heroku running the following command:

I decided to add a new image for a product in spree and in that scenario there is a generator provided by paperclip with the purpose of generate that new attachment I tried to run the following command: [shell] rails generate paperclip spree_products specs [/shell] Buuuuuuuut I received the following error: `migration_file_name': protected method `migration_file_name' called for # (NoMethodError)

Well, it is pretty straightforward you just need to add the favicon in the following locations: [shell] app/assets/images/favicon.ico and public/favicon.ico [/shell] And don't forget to add the tag in your header or your layout: [ruby] <%= favicon_link_tag image_path('favicon.ico') %> [/ruby] by the way you can generate a favicon in the following website: http://www.favicon.cc/ That's it you...