Showing file path during buffer switching in rails project in emacs [duplicate] - ruby-on-rails

This question already has answers here:
Emacs: Switching Between Buffers with the Same Name but in Different Directories
(3 answers)
Emacs navigation between files with same names
(3 answers)
Closed 8 years ago.
Im using Emacs with Ruby Electric and the Rinari extension for doing Rails development and ISwitchB for buffer switching.
In Rails it often happens that we have two files with the same name, like for example _form.html.erb, for different views. When switching buffers using C-x b, i see the filename but not the path to which the file belongs, so its not immediately apparent which one i want. Other editiors for example Sublime Text show that, but i want to stick with Emacs :)
Is there a way to show the path of the file too while switching buffers ?
Thank You

Added the following to my .emacs
(require 'uniquify)
(setq uniquify-buffer-name-style 'forward)

Related

cannot add certain images [duplicate]

This question already has answers here:
Cannot add any images
(2 answers)
Closed 9 years ago.
Every time i add an image for i get the error below. For some reason even if i rename it it still doesn't work, this problem was happening before on another project so i deleted it and started again. i have already checked for duplicate images that did get rid of the error however once i built the project the the picture was blank and i get a message saying
2013-11-07 16:45:28.613 Chiswick W4[1812:60b] Could not load the "1frivoli.png" image referenced from a nib in the bundle with identifier "Studentathome.Chiswick-W4"
need some help urgently!!
Also i would like to add i can take a screen shot of that image and input it however i will have to do this is a worst case scenario i just want to know why my images don't work.
thank you
Often you can try to open the file with Preview, and if it opens resave it as a different file, and use the saved file in your project. It handles more png variations than iOS but usually writes files that can be read. Photoshop is just one of many sources that can create pngs unreadable by ios.

Generate html files using asciidoc in a rails application

I will try to explain my problem : I have a rails application which, for the moment, shows the files which are present in my public directory (there are only txt files). I would like to transform my txt files into html files using asciidoc command when I click on a button in my application (or automatically when I add a txt file in the directory) but I don’t know how to do that.
Thanks in advance.
I don't see this as being closed so...
The best way to go about this is to use asciidoctor, the ruby implementation of asciidoc. It is used in github and it plays quite well with rails.
To read all the files with .asciidoc extension you can google and find many useful answers, such as the one you pointed out in your comment.

Internet explorer 9 version on Rails [duplicate]

This question already exists:
Closed 10 years ago.
Possible Duplicate:
Issues in Internet Explorer 9
IE->not reading file and as in firefox----> s(input_id).files is giving file details and IE----> it is null or undefined value. so let me know how to read file in IE. how do i get file size, file name etc in IE9
I assume that you are trying to access the FileList on the client side using something like document.getElementById("input_id").files.
The files method is part of the File API and not supported by IE9. However, IE10 supports it.

Using LuaDoc with extensions other than .lua

I am currently developing lua scripts for a new application which requires the extension to be xx_lua. I have luadoc working fine for .lua extensions and I know I could simply rename the files to the lua extension create the documents and rename them back, but personally I would prefer a more elegant solution.
Is is possible to get luadoc to look at other extensions. I have tried calling
luadoc_start *.xx_lua
but that results with no output even when there are plenty of files in the path with that extension.
If modifying luadoc is an option then you can do that. I just had a quick look at the 3.0.1 version (latest at the moment of writing this) and in src/luadoc/taglet/standard.lua there's line 406:
local patterns = { "%.lua$", "%.luadoc$" }
The pattern "%.lua" is used at two other locations (same file, line 316) and in src/luadoc/doclet/html.lua:53, that last one doesn't seem relevant. The right thing to do in my opinion would be to create a global parameter for filename extension and use it instead of the hardcoded ".lua". Maybe you can even submit a patch to luadoc and improve it for future programmers in your situation :)

Ppening an HTML file on localhost in XAMMP/apache 2.2 using subdirectories under htdocs [duplicate]

This question already has answers here:
How do I run a file on localhost?
(7 answers)
Closed 4 years ago.
I have a site directory for html (dreamweaver CSS3) with lots of subdirectories that contain HTML files for a number of drop down menus. They work fine where they are, but they all have menus that are JavaScript and could be kept in a separate file. So, I want to use Include. I don't want to have to FTP my files to HostGator every time I want to test the includes. I want to have this on my local machine. So, I am attempting for the first time to setup XAMMP and then run my html files (site) on localhost, so I can see what they look like before ftping everything to HostGator and putting it live.
I tried copying the main site folder to htdocs, and then copying the path to the file I want to run in front of the localhost in Firefox, but it gave me file not found:
http://localhost/xampp/PL_20080923/0-Sections/000-ComingSoon/PHPTestComingSoonNMBT-Test.html
Do I have too many subdirectories? Why isn't the file being found? It is there.
Tried this too:
http://localhost/xampp/htdocs/PL_20080923/0-Sections/000-ComingSoon/PHPTestComingSoonNMBT-Test.html
No go.
http://localhost/ should be equivalent to xampp/htdocs/ (i.e. the same files should be accessible but served by the webserver.) This is the document root. So for example on a normal windows xampp installation http://localhost/index.html should serve c:\xampp\htdocs\index.html.
Did you try http://localhost/PL_20080923/0-Sections/000-ComingSoon/PHPTestComingSoonNMBT-Test.html ?

Resources