iOS provides a convenient way to remote-debug web apps with Mobile Safari. Perhaps I’ve not yet discovered the equivalent in Android, but a little googling revealed a damn cool tool:
Just installed Mountain Lion 10.8 fresh on my Mac Mini with a new SSD. As I get my rails environment up and running I ran into this common problem:
WARNING: Nokogiri was built against LibXML version 2.9.0, but has dynamically loaded 2.7.8
I had installed nokogiri with bundler. Unfortunately I don’t know which of these things quite resolved my issue, but this is what I did:
gem uninstall nokogiri brew update brew uninstall libxml2 brew install libxml2 --with-xml2-config bundle exec gem pristine nokogiri
After all this, the warning was gone. I wish I knew which of these was extraneous, if any, but I guess I’ll find out next time assuming this common problem doesn’t get smoothed out upstream.
After a lot of searching as to why range headers were not working despite thinking that I had X-Accel-Redirect configured properly, I realized that I was missing something in my nginx config and so send_file was still sending via rails rather than nginx, causing range headers to fail.
In order to fix this, I had to add a bit more to my nginx config:
Now it works!
Mobile Safari Debugging
In order to view the browser inspector for the Safari session on your iPad, go to Settings->Safari->Advanced and enable Web Inspector
Next, connect the iPad to your Mac and open Safari. Choose Develop from the menu bar and you will see the connected iPad and be able to open the console session.
On Mobile Safari, $(element).live() appears not to work. The workaround is to add the attribute ‘onclick’ to the element. Now it works.
Capybara.server_port = 3001 Capybara.app_host = "http://localhost:3001" ActionController::Base.asset_host = Capybara.app_host
config.assets.enabled = true config.assets.debug = true
Since the users of the droplets will not have any gems installed, they need to be unpacked and added to your project:
gem unpack NAME
Be sure to do this for all dependencies of the given gem(s). Bundler helps quite a bit in figuring out what those are (e.g.
bundle package), however
bundle package provides you the
.gem files and not the actual ruby scripts, so I use
Next, put the unpacked gems within your project, e.g.
vendor/gems and add this to your script:
I do NOT require rubygems in these scripts, however if you will be doing this, or you suspect a gem might be doing this, you’ll want to prepare in advance, with a slight mod to the above:
root@debian:~# aptitude install libavahi-compat-libdnssd-dev libavahi-compat-libdnssd1
Detect the device using
wodim –devices and remember the drive name, I’ll assume it was
Make a directory to mount the device on with
Mount it with
mount -t iso9660 /dev/scd0 /media/cdrom
Drive contents can now be found at
/media/cdrom. Unmount with