Spork don't run on Ubuntu 10.04 in RubyMine 4.5.4
When I run "Tools -> Run Spork DRb server (spec)" i got error
/usr/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /usr/bin/spork rspec
-e:1:in `load': /usr/bin/spork:11: syntax error, unexpected tLAMBDA, expecting keyword_do_LAMBDA or tLAMBEG (SyntaxError)
Spork->new->load_hub->command->process(@ARGV);
^
from -e:1:in `<main>'
Process finished with exit code 1
my /usr/bin/spork:
#!/usr/bin/perl -w
eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
if 0; # not running under some shell
use strict;
use warnings;
use Spork;
our $VERSION = '0.19';
use lib 'lib';
Spork->new->load_hub->command->process(@ARGV);
__END__
=head1 NAME
spork - The Spork Command Line Utility
=head1 USAGE
> mkdir my-slideshow
> cd my-slideshow
> spork -new
> spork -make
> spork -start
=head1 DESCRIPTION
Spork is a Perl module for creating standalone HTML slideshows from Kwiki
markup.
=head1 AUTHOR
Brian Ingerson <INGY@cpan.org>
=head1 COPYRIGHT
Copyright (c) 2004. Brian Ingerson. All rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
=cut
# vim: set ft=perl:
in project using gem 'spork', '>= 0.9.2'
But when I run in console "bundle exec spork" all run normaly.
Run from IDE cause error.
What I can fix this?
Please sign in to leave a comment.
Hi,
it looks like the /usr/bin/spork is not a ruby spork script (some other package has installed this scipt here :()
One way to fix the problem is to finde where (in your gems) ruby spork binary is located and edit spork run configuration to
use this script instead.
BTW do you use some specific settings of bundler or just default ones?
Oleg.
You be right.
and it work!
How is it happenens? I don't know. Just install Ubuntu, Ruby, RubyMine ... any way it's work now! :)
______________________________________________________________
But another problem is here. I am add to /.rspec line: --drb
When I start Spork in IDE and then run RSpec from IDE I see in spork window:
and in RSpec window:
and all this take 8s same as without Spork.
look like runing spec from "rake" not using spork... because if run "bundle exec rspec --drb spec" all spec running in 2s
any idea?
Hm, how do you run spork? I think you should apropriate param to it to support rspec. Also you need to "bootstrap" your rspec tests
(see http://www.jetbrains.com/ruby/webhelp/using-drb-server.html for more information)
Regards, Oleg.
Spork already bootstraped. When I run "Tools -> Run Spork DRb Server", select "Rspec" and check "Perform bootstrap"
When run without "Perform bootstrap":
this "SECURITY WARNING" appear in many other places, don't know what he mean, but maybe this not related to problems with Spec in IDE.
my/spec_helper.rb:
I'm neither rails developer (thus I know nothing about the warnings you see) nor full day ruby developer (thus I can not say from the code you provide if it can cause the problems you see).
But I'd suggest to try run both spork and rspec from command line and check if the problem is RM specific or not.
If it is not then I'd suggest to ask your question on spork/rails forums. If not I could look at this but w/o test to reproduce it may take some time.
Regards, Oleg.
Sadly, but I can't describe step to reproduce, for this need reinstall system and install all software. No time for this :( If it help, I can open remote destkop (TeamViewer).
About command line:
If I run "bundle exec rspec spec" or "rspec --drb spec" all test run using Spork. Because he run faster when Spork server run, and say "No DRb server is running. Running in local process instead ..." in case Spork server off.
In IDE I run: Tool -> Run rake task ... -> spec
and get
So IDE using rake. When I run in console "rake spec [--drb]" all tests run withoun using Spork server.
This issue ralete to "rake", "application settings", "RSpec gem" or "IDE" ?
Hi,
based on your description I'd say that it looks like spec rake command is unable to execute specs in spork. Thus I'd suggest to discuss this with rspec community.
As a short term solution I'd suggest to use "Run all specs in directory" in RM (right click on directory with specs and select this item)
Regards, Oleg.
I don't know in what way installed my Ruby, and this fact bother me. So I just reinstall Ubuntu and install Ruby with RVM. And all problem with RubyMine is disappear.
There were problems with the OS and Ruby enviroment, not with IDE.
RubyMine is great.
I'm happy to hear this :)