I'm currently running the following Guardfile
guard 'cucumber' do
watch(%r{^features/.+\.feature$})
watch(%r{^features/support/.+$}) { 'features' }
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] }
end
After running
> bundle exec guard --debug
I receive the following output
13:59:55 - ERROR - Invalid Guardfile, original error is:
> [#] wrong number of arguments (2 for 1)
13:59:55 - ERROR - No guards found in Guardfile, please add at least one.
13:59:55 - DEBUG - Command execution: which notify-send
13:59:55 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
13:59:55 - INFO - Guard is using TerminalTitle to send notifications.
13:59:55 - DEBUG - Command execution: hash stty
13:59:55 - DEBUG - Guard starts all plugins
13:59:55 - INFO - Guard is now watching at '/opt/app'
13:59:58 - DEBUG - Start interacto
I'm using Ruby 1.9.3p551, Rubygems is 2.6.2, guard 1.8.3, guard-cucumber 2.0.0.
Any suggestion of what could be the problem?
Upgrade to Guard 2.13.0 (Guard 1.8.3 is obsolete).
It might be because older Guard expects a symbol, and not a string, so this could work:
guard :cucumber do
Related
I have a circleci configuration that runs a script to deploy a storybook site. It's essentially cding into my frontend monorepo packages, running yarn install, builds the storybook and syncs it to an S3 bucket.
(redacting a few things like names of packages and files)
It starts a with job within my circle's config file:
deploy-package-storybook:
<<: *defaults
working_directory: ~/root
steps:
- checkout
- <<: *install_aws
- attach_workspace:
at: ~/
- run:
name: Deploy Storybook
command: |
~/root/bin/deploy-storybook.sh PACKAGE
The script looks like this:
echo "${CYAN}deploying storybook\n"
cd packages/${TAG}
yarn build-storybook
aws s3 sync ./artifacts/storybook s3://storybook.website.us/${TAG} --delete || slack_alert storybook-deploy-fail
slack_alert "deploy-storybook-success"
When it runs in Circle, it seemingly finishes syncing and even sends a slack alert to my channel that it successfully deploys, but however at the end of it, it shows this:
upload: artifacts/storybook/vendors~main.8c562e1c344f6a5f2073.bundle.js to s3://storybook.website.us/package/vendors~main.8c562e1c344f6a5f2073.bundle.js
0
ok
Exited with code exit status 1
CircleCI received exit code 1
However I'm not entirely sure why it does this. It's successfully synced, so it should pass, right?
Things I've done:
I've tried adding a --debug flag to aws s3 sync like so:
aws s3 sync ./artifacts/storybook s3://storybook.website.us/${TAG} --delete --debug
and it returns with something like this:
2020-03-16 13:14:28,349 - ThreadPoolExecutor-0_2 - botocore.hooks - DEBUG - Event needs-retry.s3.PutObject: calling handler <botocore.retryhandler.RetryHandler object at 0x7fcc35212dd0>
2020-03-16 13:14:28,349 - ThreadPoolExecutor-0_2 - botocore.retryhandler - DEBUG - No retry needed.
2020-03-16 13:14:28,350 - ThreadPoolExecutor-0_2 - botocore.hooks - DEBUG - Event needs-retry.s3.PutObject: calling handler <bound method S3RegionRedirector.redirect_from_error of <botocore.utils.S3RegionRedirector object at 0x7fcc35212e10>>
2020-03-16 13:14:28,350 - ThreadPoolExecutor-0_2 - botocore.hooks - DEBUG - Event after-call.s3.PutObject: calling handler <function enhance_error_msg at 0x7fcc35c79320>
2020-03-16 13:14:28,350 - ThreadPoolExecutor-0_2 - s3transfer.utils - DEBUG - Releasing acquire 34/None
upload: artifacts/storybook/vendors~main.5f43fbfd82bbe3ed3177.bundle.js to s3://storybook.website.us/package/vendors~main.5f43fbfd82bbe3ed3177.bundle.js
2020-03-16 13:14:28,365 - Thread-1 - awscli.customizations.s3.results - DEBUG - Shutdown request received in result processing thread, shutting down result thread.
0
ok
Exited with code exit status 1
CircleCI received exit code 1
This isn't my area of expertise, so I'm really lost on what to do with errors like these. Could someone please help?
I'm trying to release using the gradle release plugin but whenever the plugin is using GIT, it's not passing my username and password:
I 'm invoking it as:
I'm using:
C:\GradleReleaseTest>gradle --version
------------------------------------------------------------
Gradle 2.11
------------------------------------------------------------
Build time: 2016-02-08 07:59:16 UTC
Build number: none
Revision: 584db1c7c90bdd1de1d1c4c51271c665bfcba978
Groovy: 2.4.4
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_66 (Oracle Corporation 25.66-b18)
OS: Windows 7 6.1 amd64
My gradle release configuration looks as:
release {
failOnCommitNeeded = true
failOnPublishNeeded = true
failOnSnapshotDependencies = true
failOnUnversionedFiles = true
failOnUpdateNeeded = true
revertOnFail = true
preCommitText = ''
preTagCommitMessage = '[Gradle Release Plugin] ${release.releaseVersion} - pre tag commit: '
tagCommitMessage = '[Gradle Release Plugin] ${release.releaseVersion} - creating tag : '
newVersionCommitMessage = '[Gradle Release Plugin] ${release.releaseVersion} - new version commit: '
tagTemplate = '${version}'
// May decide to add additional custom tasks here
buildTasks = ['build']
scmAdapters = [
net.researchgate.release.GitAdapter
]
}
The error I'm getting looks like:
C:\GradleReleaseTest>gradle release -Prelease.releaseVersion=1
.0.0 -Prelease.newVersion=1.0.1-SNAPSHOT -Prelease.username=jvergara -Prelease.p
assword=thePassword
:release
:com.mycompany.gradletest:createScmAdapter
:com.mycompany.gradletest:initScmAdapter
:com.mycompany.gradletest:checkCommitNeeded
:com.mycompany.gradletest:checkUpdateNeeded
Running [git, remote, update] produced an error: [bash: /dev/tty: No such device
or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.mycompany.com': Invalid ar
gument
error: Could not fetch origin]
:com.mycompany.gradletest:checkUpdateNeeded FAILED
:release FAILED
Release process failed, reverting back any changes made by Release Plugin.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':checkUpdateNeeded'.
> Failed to run [git remote update] - [Fetching origin
][bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://git.mycompany.com': Invalid ar
gument
error: Could not fetch origin
]
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 5.912 secs
I managed to resolve this. The problem has nothing to do with the plugin at all, but rather how git itself work.
You either have to use a global config for the credentials or you have to use local config
See, https://git-scm.com/docs/gitcredentials. I used the local version and it works just fine.
I can't get Guard to run any action.
I'm using:
Gentoo x64 (3.14.14)
rbx-2.5.2
guard 2.11.1
listen 2.8.5
Guardfile is just catch-it-all from Understanding guard
guard :rspec, cmd: "bundle exec rspec" do
watch(/(.*)/) { |m| Guard::UI.puts "Unknown file: #{m[1]}"; nil }
end
And here is the output of $ LISTEN_GEM_DEBUGGING=2 bundle exec guard -d
I, [2015-02-04T08:11:34.995518 #25370] INFO -- : Celluloid loglevel set to: 0
I, [2015-02-04T08:11:34.997566 #25370] INFO -- : Listen version: 2.8.5
08:11:35 - DEBUG - Notiffany: gntp not available (Please add "gem 'ruby_gntp'" to your Gemfile and run your app with "bundle exec".).
08:11:35 - DEBUG - Notiffany: growl not available (Unsupported platform "linux-gnu").
08:11:35 - DEBUG - Notiffany: terminal_notifier not available (Unsupported platform "linux-gnu").
08:11:35 - DEBUG - Notiffany: libnotify not available (Please add "gem 'libnotify'" to your Gemfile and run your app with "bundle exec".).
08:11:35 - DEBUG - Notiffany: notifysend not available (Please add "gem 'notify_send'" to your Gemfile and run your app with "bundle exec".).
08:11:35 - DEBUG - Notiffany: notifu not available (Unsupported platform "linux-gnu").
08:11:35 - DEBUG - Command execution: emacsclient --eval '1'
08:11:35 - DEBUG - Notiffany: emacs not available (Emacs client failed).
08:11:35 - DEBUG - Notiffany: tmux not available (:tmux notifier is only available inside a TMux session.).
08:11:35 - DEBUG - Notiffany: file not available (No :path option given).
08:11:35 - DEBUG - Notiffany is using TerminalTitle to send notifications.
08:11:35 - DEBUG - Command execution: hash stty
08:11:35 - DEBUG - Guard starts all plugins
08:11:35 - DEBUG - Hook :start_begin executed for Guard::RSpec
08:11:35 - INFO - Guard::RSpec is running
08:11:35 - DEBUG - Hook :start_end executed for Guard::RSpec
D, [2015-02-04T08:11:35.245730 #25370] DEBUG -- : Adapter: considering TCP ...
D, [2015-02-04T08:11:35.245850 #25370] DEBUG -- : Adapter: considering polling ...
D, [2015-02-04T08:11:35.245900 #25370] DEBUG -- : Adapter: considering optimized backend...
I, [2015-02-04T08:11:35.286148 #25370] INFO -- : Record.build(): 0.03905487060546875 seconds
08:11:35 - INFO - Guard is now watching at '/media/I/08projects/programming/rails/tests/guard_test'
08:11:35 - DEBUG - Start interactor
[1] guard(main)> D, [2015-02-04T08:11:44.639225 #25370] DEBUG -- : inotify: app/controllers/users_controller.rb ([:attrib])
D, [2015-02-04T08:11:44.639598 #25370] DEBUG -- : raw queue: [:file, #<Pathname:/media/I/08projects/programming/rails/tests/guard_test>, "app/controllers/users_controller.rb", {:change=>:modified}]
D, [2015-02-04T08:11:44.640532 #25370] DEBUG -- : inotify: app/controllers/users_controller.rb ([:close, :close_write])
D, [2015-02-04T08:11:44.640733 #25370] DEBUG -- : raw queue: [:file, #<Pathname:/media/I/08projects/programming/rails/tests/guard_test>, "app/controllers/users_controller.rb", {:change=>:modified}]
As far as I can see, listen detects file change but for some reason won't forward it to guard
My English is not so good. Sorry.
I have:
PHPUnit 3.7.24
Selenium 2.35.0
I am starting selenium server:
java -jar /usr/local/bin/selenium-server-standalone-2.35.0.jar
Output:
04.09.2013 13:51:15 org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
13:51:25.373 INFO - Java: Sun Microsystems Inc. 20.45-b01
13:51:25.374 INFO - OS: Linux 3.8.0-29-generic i386
13:51:25.388 INFO - v2.35.0, with Core v2.35.0. Built from revision c916b9d
13:51:25.542 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
13:51:25.543 INFO - Version Jetty/5.1.x
13:51:25.544 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
13:51:25.545 INFO - Started HttpContext[/selenium-server,/selenium-server]
13:51:25.546 INFO - Started HttpContext[/,/]
13:51:25.567 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#dda25b
13:51:25.567 INFO - Started HttpContext[/wd,/wd]
13:51:25.571 INFO - Started SocketListener on 0.0.0.0:4444
13:51:25.577 INFO - Started org.openqa.jetty.jetty.Server#b61fd1
My simple test:
public function testTitle()
{
$this->url('/');
$this->assertEquals('My title.', $this->title());
}
Next, run phpunit test with command:
phpunit --debug functional/MainPageTest.php
Output:
PHPUnit 3.7.24 by Sebastian Bergmann.
Configuration read from /home/demyan112rv/www/boo/protected/tests/phpunit.xml
Starting test 'MainPageTest::testTitle'.
E
Time: 17.59 seconds, Memory: 2.75Mb
There was 1 error:
1) MainPageTest::testTitle
PHP Warning: include(PHPUnit_Extensions_Story_TestCase.php): failed to open stream: No such file or directory in /home/demyan112rv/www/yii/YiiBase.php on line 421
PHP Warning: include(): Failed opening 'PHPUnit_Extensions_Story_TestCase.php' for inclusion (include_path='.:/home/demyan112rv/www/boo/protected/helpers:/home/demyan112rv/www/boo/protected/widgets:/home/demyan112rv/www/boo/protected/extensions/mail:/home/demyan112rv/www/boo/protected/services:/home/demyan112rv/www/boo/protected/components:/home/demyan112rv/www/boo/protected/models:/usr/share/php:/usr/share/pear') in /home/demyan112rv/www/yii/YiiBase.php on line 421
BadMethodCallException: The command http://localhost:4444/wd/hub/session/url is not recognized by the server.
/home/demyan112rv/www/yii/test/CWeb2TestCase.php:60
/home/demyan112rv/www/boo/protected/tests/functional/MainPageTest.php:11
/home/demyan112rv/www/boo/protected/tests/functional/MainPageTest.php:11
FAILURES!
Tests: 1, Assertions: 0, Errors: 1.
And in this time in selenium server a have next output:
13:55:39.438 INFO - Executing: [new session: {browserName=firefox}] at URL: /session)
13:55:39.452 INFO - Creating a new session for Capabilities [{browserName=firefox}]
13:55:56.642 INFO - Done: /session
I have error "BadMethodCallException: The command http:/ /localhost:4444/wd/hub/session/url is not recognized by the server.". This bug fixed for 2.35 in this link , but i have 2.35 and i have this error.
How to fix this problem?
Solution (i don't may answer on my question, because my rating is less than 10.
$ whereis phpunit
phpunit: /usr/bin/phpunit /usr/bin/X11/phpunit /usr/local/bin/phpunit
I have 3 path to phphunit. I don't know, it's normal or no.
When i changed command from:
phpunit --debug functional/MainPageTest.php
to
/usr/bin/phpunit --debug functional/MainPageTest.php
it's working!!!
if you have setUp your browser launch method i.e
function setUp()
{
$this->setBrowser("*firefox");
$this->setBrowserUrl("http://www.google.com/");
}
your function should look like this
public function testTitle()
{
$this->open('/');
$this->assertEquals('My title.', $this->title());
}
I've changed $this -> url('/'); to $this -> open('/');
please try now.
On Windows 7 machine, using cygwin ruby 1.92, rails 3.1.3.
I run the heroku create and get the following error message:
heroku create
Creating growing-journey-1774... done, stack is bamboo-mri-1.9.2
http://growing-journey-1774.heroku.com/ | git#heroku.com:growing-journey-1774.git
1 [main] ruby 4292 C:\cygwin\usr\local\bin\ruby.exe: *** fatal error - unable to remap \\?\C:\cygwin\usr\local\lib\ruby\1.9.1\i386-cygwin\etc.so to same address as parent: 0x3E0000 != 0x3F0000
Stack trace:
Frame Function Args
0028A778 6102796B (0028A778, 00000000, 00000000, 00000000)
0028AA68 6102796B (6117EC60, 00008000, 00000000, 61180977)
0028BA98 61004F1B (611A7FAC, 61248A3C, 003E0000, 003F0000)
End of stack trace
1 [main] ruby 2856 fork: child 4292 - died waiting for dll loading, errno 11
1086458 [main] ruby 2944 C:\cygwin\usr\local\bin\ruby.exe: *** fatal error - unable to remap \\?\C:\cygwin\usr\local\lib\ruby\1.9.1\i386-cygwin\etc.so to same address as parent: 0x3E0000 != 0x410000
Stack trace:
Frame Function Args
0028A778 6102796B (0028A778, 00000000, 00000000, 00000000)
0028AA68 6102796B (6117EC60, 00008000, 00000000, 61180977)
0028BA98 61004F1B (611A7FAC, 61248A3C, 003E0000, 00410000)
End of stack trace
1098573 [main] ruby 2856 fork: child 2944 - died waiting for dll loading, errno 11
I was able to upload the SSH keys to heroku just fine in the previous step.
Any ideas? My research hasn't led me anywhere. Appreciate anybody's help!
My Gem env shows:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.12
- RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [i386-cygwin]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/local/bin/ruby.exe
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-cygwin
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.9.1
- /home/Philip/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
Your problem looks like more with Ruby or Cygwin setup and less with Heroku, try following link solution
http://redmine.jamoma.org/projects/jamoma/wiki/Setting_up_development_environment_in_Windows