Rails

Actually it is pretty straightforward you just have to download and use ngrok(it's free): [program] https://ngrok.com/ [/program] In my case I'm using a rails application so I just need to: [shell] # run my server in localhost rails server # at this moment it is available in http://localhost:3000 by default # if you want...

First thing you have to do is log-in to your server using ssh and going to the discourse installation path: [shell] # login in to your ssh account ssh youraccount@yourip.com cd /var/discourse [/shell] If you need to see the rails logs and see what is doing discourse the commands bellow are what you're looking for: [shell] # connecting to the rails application ./launcher ssh app cd /var/www/discourse #starts all the logs in console tail -f log/*.log [/shell]

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)