I've installed Rack-Bug for my Rails app, but can't get the panels to appear.
project: http://github.com/brynary/rack-bug
additional instructions: https://github.com/brynary/rack-bug/wiki/security
yet more instructions: Rack Bug Installation issue. Server does not start
(the docs really suck for this one)
From the top:
I added config.middleware.use 'Rack::Bug' to config/environments/development.rb.
I added a file config/initializers/rack_bug.rb containing the following:
require 'rack/bug'
require 'ipaddr'
ActionController::Dispatcher.middleware.use Rack::Bug,
:ip_masks => [IPAddr.new('192.168.2.2')],
:secret_key => 'epT5uCIchlsHCeR9dloOeAPG66PtHd9K8l0q9avitiaA/KUrY7DE52hD4yWY+8z1',
:password => 'password'
(I specified the IP address for my desktop. The app is running on my linux dev server at .2.3)
I went to /rack_bug/bookmarklet.html and dragged the "Toggle Rack::Bug" bookmarklet to my Firefox bookmark toolbar. I loaded a page on my Rails App, clicked the "Toggle Rack::Bug" bookmarklet, typed in the password in the popup box, clicked OK, and the page was reloaded - but with no Rack-Bug panels.
Not sure why it's not working, and there's no irc channel or google group for it.
UPDATE: And the fun keeps on leaving. Still no progress on loading the panels from Firefox on my windows desktop. However, I fired up Firefox on my linux dev server, grabbed the bookmarklet, then went to the home page of my app and clicked on it. Filled in the password, and when it reloaded, got a 500 error. Here are the first four lines from the log output:
Status: 500 Internal Server Error
undefined method `length' for #<Pathname:/home/ofer/src/ssp3>
/usr/lib/ruby/gems/1.8/gems/ruby-openid-2.1.7/lib/openid/extras.rb:3:in `starts_with?'
/home/ofer/src/ssp3/vendor/plugins/rack-bug/lib/rack/bug/panels/sql_panel/query.rb:65:in `filtered_backtrace'
So, I still haven't fixed the first problem, and now I've discovered a second which will still be around even if I fix the first problem. The second error seems to imply that Firefox on the dev server was actually loading the panel when the error hit, which apparently is in the ruby-openid internals.
I feel even more set back than before.
My guess: http://github.com/SamSaffron/rack-bug/commit/16daa41b0ac9513e2d0a2b09ad9941fcb9c5d189
Had the same problem so I wrote that patch, I'll do a pull request
I had the same problem and after fiddling around a bit found that you should reload the page without using the browser cache (i.e. press Ctrl-F5)
Is your Linux development server on the same subnet as your desktop? If it isn't then you need to specify your desktop's IP address as it appears to the server. For example my desktop's IP address is 192.X.X.X but from my production server it appears as 84.X.X.X because it's routed through my ISP's gateway.
Related
So I'm trying to make a website for school and I've been following this guys tutorial on how to make a website. But for some reason when I get to lesson 32 and I enter the ec2-user:~/environment/blog $ rails server -b $IP -p $PORT command, the website doesnt run and it says " somenumbersandletters.vfs.cloud9.us-east-2.amazonaws.com refused to connect " with an error. I've followed all the steps correctly (Except for the directory he runs it from, I run it straight from blog instead of environment because it tells me I need to make a new app the other way). I've tried disabling my firewall, I've enabled Cookies and searched the internet for a solution. I am very new to Servers and Coding and any help would be greatly appreciated!
This is my Terminal Log
Answer from https://www.reddit.com/r/aws/comments/cwnbt1/aws_cloud9_server_refuses_to_connect/
Once you start the rails server, click the 'preview' button. When this tells you that it refuses to connect, find the button that looks like two overlapping squares with an arrow to "pop out into a new window." Once it was in a new tab, it worked like a charm.
Hope this helps!
I ran into this issue as well. I could view my rails application when viewing it from within a new tab, but not within the Cloud 9 IDE tab.
If you look in the browser console when viewing through the tab, you will see this error:
Refused to display 'https://xxxxxxxxxxxxxxxxxxxxxxx.vfs.cloud9.xxxxxxxxxxx.amazonaws.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
This error is being caused because you are viewing the rails application through an iFrame via the Cloud 9 IDE. By default to add security and hinder Cross Site Scripting (XSS) attacks, Rails sets SAMEORIGIN for the X-Fram-Options header. This will not allow the rails app to be visible in the Cloud 9 IDE tab using the iFrame.
In order to bypass this, you will need to set this header to use ALLOWALL instead.
NOTE: Only do this within your development environment and never in a production environment. This could open your site up to XSS attacks.
Add the following configuration option to your config/environments/development.rb file:
config.action_dispatch.default_headers = {
'X-Frame-Options' => 'ALLOWALL'
}
After saving the changes, restart your rails server and the application should now be visible within the Cloud 9 IDE tab directly.
This is weird. On my personal computer at home when I type in my website, I get a 404 error.
No other computer gets the 404 error that I can see from several work computers to relatives, wife's laptop and even my phone using the same WIFI connection.
This only happened after switching my preferred domain under preferred hosting settings from www.xxx.com to xxx.com - perhaps coincidence, perhaps not.
I did this as links in Twitter and Facebook where directing to xxx.com and were giving me 404 errors. Note that the day I made the change the 404 errors went away and I was linking to my website. Then a day later, not working to access my website.
I would suspect nameservers etc but my computer is the only one seemingly exhibiting the problem.
I cleared the browser cache for Chrome and Edge still nothing. I downloaded FireFox and installed fresh and get the same 404 error.
I flushed the dns with ipconfig in administrator mode and it has been over 24 hours since the problem first occurred.
I can get to my website using the IP address fine. I can't using the URL, only on this computer. I even called GoDaddy to make sure it was only my machine and they say they see no problem.
The HOSTS file is virtually empty. and I can use the website with Visual Studio no problem.
Any thoughts? I am stumped on this anomaly.
Thanks again everyone! Your feedback helped me solve the problem. This project was originally started in PHP and moved to from Apache server to ASP.NET. My hosts file still had remnants to xxx.com being local, and not searching outside to the world. Removing 127.0.0.1 xxx.com solved the problem.
THANK YOU!
I'm using ahoy_email ruby gem to track the emails I send. It should give me the time at when it is opened and clicked. But it's not working properly to give the time. What I'm missing.
Note: I run the project in my localhost
I had a similar issue. Make sure your server is accessible from the outside world so the image can be fetched.
A little background: I eventually figured that it worked from the godaddy webclient but not gmail, and thats because the webclient was just loading the image from my browser (so it could see my 'localhost'), but I believe gmail uses a proxy server to load images (https://filippo.io/how-the-new-gmail-image-proxy-works-and-what-does-this-mean-for-you/) so it couldn't find it.
I've been using ngrok lately to make my localhost outside accessible (temporarily!) and been liking it.
I have this weird issue in my django application. I am using the admin interface. When I try to load the change page it doesn't render completely and when i see in logs it says:
**uwsgi_response_write_body_do(): Broken pipe [core/writer.c line 248]
IOError: write error**
The page has been working fine before and suddenly this started happening. And also the behavior is inconsistent. If I reload the page multiple times, few times it renders correctly. This issue is happening in production environment and I am not able to replicate it on my local. The production server is using uwsgi 1.9.10 with nginx and django 1.5. Also I am writing custom HTML on page and there is an inline table also on the same page.
Please let me know if anyone knows why it is happening...
that error means the client (browser) disconnected before getting the full response. Check your webserver logs, maybe you hit a timeout
Pow used to work for me a few months ago, but now it's not working for my new app, or for the ones that worked before.
I went into ~/.pow and created a symlink, but when I type MYAPPNAME.dev/ in my browser, it redirects to a cox(my internet provider) page saying "Sorry, the website subscriptions.dev cannot be found"
I read through all the docs in the pow page, and tried installing powify as well, but nothings working.
Is there something I may have done in my console (such as changing PATH or things) that may cause this to not work?
I tried restarting my computer as well, but still nothing..
=============================================================
Edit: Actually I just came to my office and it started working. Is it possible that my internet provider at home could be blocking/interfering with pow? I would assume that it's irrelevant since I thought pow was essentially a local host.
DNS hijacking from your ISP. Try setting your DNS server to 8.8.8.8 (google's DNS) and see if the problem persists.