small medium large xlarge

07 Oct 2011, 20:25
John Tilghman (1 post)

Hey Adam,

If I understand this shortening correctly. This program should take a URL then hash it. And then display as both the hashed version and the original version with the hashed version also in the cut and paste window.

If that is correct, then when I try to run the code, it works. But if I try to click the hashed URL its bombs.

So i looked at the code and decided to rem out this part:

helpers do
  def base_url
    base = "http://#{Sinatra::Application.bind}"
    port = Sinatra::Application.port == 80 ? base : base << ":#{Sinatra::Application.port}"

  def url(path='')
    [base_url, path].join('/')

And now it works just fine. Strange.
02 Dec 2011, 05:24
dannin (2 posts)

Well, I guess you are right. This program is supposed to hash the URL and afterwards display the hashed as well as original version in the cut and paste window. Anyway, I am quite surprised that you solved the issue you were having by remming out the part the above part.I am looking forward for more information about cloud computing, do we have a thread dedicated to it. I didnt find any!

24 Jan 2018, 05:47
Ravi Singh (1 post)

Hello there,

If you are looking to know about Cloud Computing, then we have a course related to it. Which anyone can join to grow their knowledge as Cloud Computing Expert.

You must be logged in to comment