RubyTest Sublime Text 2 not working on Windows 7 - windows-7

I've been messing around with this for well over an hour and still can't get RubyTest working within Sublime Text 2. Each time that I attempt to run a test I get a simple message that " 'rspec' is not recognized as an internal or external command, operable program or batch file."
I tried both the clone from github method of installing RubyTest, as well as via Package Installer with the same results. I'm launching Sublime Text 2 via "subl ." from my application's directory.
I know I'm just missing something simple, but all of the fixes I've found on the web are specific to non-Windows environments and I haven't been able to adapt the answers to my circumstances.
I am NOT using pik or any other Ruby version manager.
What am I doing wrong?

Figured it out, needed to prefix "bundle exec" to the "rspec" command in my User - RubyTest.sublime-settings file to get it to work. – Rob Jan 29 '13 at 20:26

Related

Error adding vagrant box in PHPStorm 7, ruby.exe error

My PHPStorm 7 installation is throwing this error whenever I try to add a box. Am I missing something?
I pointed to the vagrant.bat in installation directory as told here
Am I supposed to install ruby too? Didn't say something like that in vagrant's site though.
The path to the .bat file you are using (...\embedded\gems\...) suggests that it is ruby related .. and may require ruby for proper executing (the error message you see confirms such suggestion).
Instead, choose vagrant executable from C:\Program Files (x86)\HashiCorp\Vagrant\bin\ folder.
If .bat file is absent -- choose .exe one instead.

Hart1´s Ruby Tutorial - Subl Gemfile - failed with error -43

I am struggeling my way through Hart1's Ruby Tutorial, and I can't get past this point; whenever I execute the subl Gemfile command, I get the following error:
FSPathMakeRef(/Applications/Sublime Text 2.app) failed with error -43.
Can someone help me??
To echo what R_G said - you should definitely include more information about your environment to get better help.
What's happening here could be that you don't have sublime text installed in your applications (if you downloaded on a mac, you have to drag it into the applications folder - Or you don't have the 'subl' command set up in your command line. I never got subl as a command to work from my command line when I was working on a windows computer....
Here are instructions on how to do these things - if you are working from a Mac. http://www.sublimetext.com/docs/2/osx_command_line.html
What it's trying to get you to do is just open the gemfile with sublime text - so since you are just beginning -- just do that. Manually open the sublime text application and then manually find the gem file in your application folders and open it.

My rvm install script works and apparently uses rvm correctly but a new/reloaded bash fails with a syntax error

I wrote this script https://gist.github.com/1313611 to ease my installs for rvm. The whole script simply installs rvm, installs 1.9.2, rails and creates a default gemset. All of that works and I can verify that inside the .rvm folder. However after installing a I get:
bash: ~/.rvm/scripts/rvm: line 14: syntax error near unexpected token `do'
bash: ~/.rvm/scripts/rvm: line 14: ` do'
I've also tried using curl -sB. I'm guessing it has to do with my environment but can't seem to figure out the problem (obviously, ha).
Thanks for any input
CLARIFICATION: I'm on an Fedora 14 Desktop - I have it working with no edits to my script on a shared hosting account at Dreamhost.
Not sure it helps (planning to dig into a bit more) but the computer it fails on is managed by the school which means the Home dir I install to is on NFS. Another environment oddity is that the default shell (ypchsh won't let me change yet [working with boss to change]) is tcsh, but I always run bash when I open a terminal. I'm thinking this last bit is a problem.
BLAST - Apparently there was a script being loaded that is basically a universal bashrc for our school where someone set and alias to 'for' because it had something to do with fortran.
So I just copied that rc to my directory to fix up that alias and now reference that file rather than the universal rc.
Well we learned something today - when in this much doubt check all aliases.

Error with Compass polling on windows 7

I am attempting to work locally on a PHP application which I cloned from the Git repository my partner and I use.
He uses a Mac, and until now I have been working on the app in a virtual Ubuntu Linux environment. Both environments have been able to use Compass polling with the same file structure and files.
On Windows 7, I run Compass commands from Cygwin, and this is the command I use to have Compass poll from the root directory of the app (C:/wamp/www/application):
compass watch --trace src/Application/ApplicationBundle/Resources/compass/
When I then make a change to a .scss file, I receive the following error:
ArgumentError on line 716 of /usr/lib/ruby/1.8/pathname.rb: different prefix: "/
/cygdrivecwampwwwlimelightsrclimelightlimelightbundleresourcescompasssrcpartials
_object.scss" and "/cygdrive/c/wamp/www/limelight/src/limelight/limelightbundle/
resources/compass/src"
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/path.rb:81:in 'split_path'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/path.rb:69:in 'run_callback'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/path.rb:55:in 'callback_action'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/path.rb:35:in 'update'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/state/directory.rb:39:in 'modified'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/state/directory.rb:37:in 'each'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/state/directory.rb:37:in 'modified'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/state/directory.rb:18:in 'refresh'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/backends/polling.rb:17:in 'run'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/backends/polling.rb:17:in 'each'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/backends/polling.rb:17:in 'run'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/backends/polling.rb:15:in 'loop'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/backends/polling.rb:15:in 'run'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/monitor.rb:26:in 'run'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm.rb:20:in 'monitor'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/lib/compass/commands/watch_project.rb:86:in 'perform'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/lib/compass/commands/base.rb:18:in 'execute'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/lib/compass/commands/project_base.rb:19:in 'execute'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/lib/compass/exec/sub_command_ui.rb:43:in 'perform!'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/lib/compass/exec/sub_command_ui.rb:15:in 'run!'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/bin/compass:25
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/bin/compass:39:in 'call'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/bin/compass:39
/usr/bin/compass:19:in 'load'
/usr/bin/compass:19
All I've been able to find through searching is that it may have something to do with the fact that Windows capitalizes its drive names, although the lack of slashes in the returned path makes me think the problem may be elsewhere.
Does anyone know why I might receive this error in Windows, but not other platforms?
NOTE: I have found a work-around involving installing ruby (and compass) through Windows' command prompt rather than Cygwin, and that should work fine for now. Still, if anyone has ideas, I'm still curious as to what the problem could be.
According to this commit, this is a problem caused by a compass dependency called FSSM. It is used to monitor file changes in compass. A workaround is described in this comment.
It seems that FSSM detects that ruby is running inside a Windows box, and treats paths in the Windows' way (C:\blabla). Commenting out the line 26 of the file <fssm_gem_path>/lib/fssm/pathname.rb makes compass watch work as expected. You can also add
unless path[0, 1] == File::SEPARATOR
to the end of line 26 to make it work.
I thought I'd just provide a little more info to help people find the pathname.rb file.
On the cygwin prompt type:
gem env
This (unsurprisingly) brings up a load of info about your Ruby Gems installtion. Look for the line which specifies the INSTALLATION DIRECTORY. Mine was:
/usr/lib/ruby/gems/1.8
Now in Windows Explorer navigate to this location but substitute "usr" for your cygwin installation directory. Therefore the above path becomes:
C:\cygwin\lib\ruby\gems\1.8
Once in this location drill down until you come across the fssm gem directory.
Within this [fssm] directory go into:
/lib/fssm/
...and there you should find the pathname.rb file.
Edit it as above and all is well. I hope this helps.
See here for a possible fix:
http://rails.webintellix.com/2010/05/27/error-in-ruby-relative_path_from-call-on-windows/
I was running into this same error with a slightly different setup. My project folder was on a network drive (ruby and sass/compass installed locally), and every time I made a change to a .scss file compass watch would crash with similar errors to the OP. I solved the issue by mapping my network drive instead of accessing it directly via the network (right clicked on My Computer and choose map network drive so I could access my remote drive at A:).
Now, instead of doing 'compass watch //SERVERNAME/My_Project' (I'm using Git Bash), I do 'compass watch a/My_Project' and compass stopped crashing.
Hope that helps someone else.
Using Cygwin, re install a compass dev release (such as 0.13+). Works for me with Compass 0.13.alpha.4 (Markab)
To do so:
gem uninstall compass
gem install compass --pre --no-rdoc --no-ri

Need help with starting RoR: Command "rails server" does not result in "Booting WEBrick"?

I need help to get started with RoR.
I currently follow this guideline:
http://allaboutruby.wordpress.com/2009/07/20/installing-rails-on-windows-3-years-later/#comment-11099
I followed step 1 through 3 w/o problems.
In step 5: I can get the webserver through WEBrick working.
When i put
"rails server"
instead of getting "Booting Webrick", i get "rails new_path option"
thus when i try 127.0.0.1:3000 in the browser... it does work.
Can anyone guide me on this on how to get it up and runnning? (Im a total newb for now...so i need specific explanations! thanks!)
In your tutorial i can't see the command 'bundle install' - it's checking and installing all necessary gems in your system. So why you don't use another great rails tutorial - http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
I'm guessing you are running windows, on which rails can be a little awkward. You'll probably need to run the rails server command by pointing ruby at the server script. On windows, your rails "commmand" is actually just a .bat file that lives in the /bin file of your ruby installation, and that .bat file just passes the arguments to ruby. If you look at the rails gem that is installed on your machine, you'll see the files that correspond to the normal first argument of a rails command (console, generate, server, etc). You might find it helpful to copy these to the /script directory of your application, and when you want to run a rails command you can just run "ruby script\server" from your application's main directory, though there may be more accepted ways of getting the same result.

Resources