Sublime Text 3, rbenv, TestUnit, RubyTest and Spring correct configuation to get tests working - sublimetext2

So I've setup RubyTest / Sublime Text 3 and that works fine. I'm having trouble getting spring to work in RubyTest. There is this cryptic setting:
"check_for_spring": false,
But when I set to true and run a test it just gives me the default spring command output e.g:
Version: 1.1.3
Usage: spring COMMAND [ARGS]
Commands for spring itself:
If I follow info on this url (https://github.com/rails/spring), correct way to call a test is?
bin/rake test test/functional/posts_controller_test.rb
Now my current settings for test running are:
"run_ruby_unit_command": "ruby -Itest {relative_path}",
"run_single_ruby_unit_command": "ruby -Itest {relative_path} -n '{test_name}'",
If I try chaning to:
bin/rake test
This doesn't work, gives a command not found error even if I copy / paste the command path and it works in shell.
I'm out of ideas help!

This will do the trick
"run_ruby_unit_command": "export PATH=~/.rbenv/shims:$PATH; bin/rake test -Itest {relative_path}",
"run_single_ruby_unit_command": "export PATH=~/.rbenv/shims:$PATH; bin/rake test {relative_path} {test_name}",

I use this
"run_ruby_unit_command": "spring rake test {relative_path}",
"run_single_ruby_unit_command": "spring rake test {relative_path} {test_name}"

Related

Run single test with PhpStorm and PHPUnit on Symfony project fail with error: "Cannot open file"

When I run all tests with PhpStorm everything works fine but when I try to run a single test I get the error:
Cannot open file <namespace>.
We check version of PHP and PHPUnit compatibilities and everything looks fine. When I run single file test the following command is executed:
/php7.4.7/php.exe phpunit-9.4.2.phar --bootstrap <my_project_folder>\tests\bootstrap.php --configuration <my_project_folder>\phpunit.xml.dist --filter "/(::<ClassTestIWantToExecute)( .*)?$/" <namespace_of_classTest> <my_project_folder>\tests\EnsembleImmobilierTest.php --teamcity --cache-result-file=<my_project_folder>\.phpunit.result.cache
PHPUnit is executed but couldn't find the test to execute.

why Connection test failed?

When i select custom setting and select sql and enter all fields
Connection test failed: Cannot find module\AppData\Local\Temp\strapi9a2b8146f759\node_modules\strapi-connector-bookshelf\lib\utils\connectivity.js'
I know It's old but I just want to reply for future people who have the same issue.
Try to use yarn create strapi-app --quickstart or using npx npx create-strapi-starter --quickstart, and It'll use the default template
and then when It finish getting dependencies and finish setting up your project go to a file called database.js and add your database set of infos.
Got this info from issue opened in github : Here

How to run selenium IDE on chrome

I want to run selenium IDE on chrome. for that i have to write following cmd command. As it is shown here
E:\Automation\Selenium>java -jar selenium-server-standalone-3.5.3.jar chromedriver.exe
But it gives me the error like below :
Exception in thread “main” com.beust.jcommander.ParameterException: Was passed main parameter ‘chromedriver.exe’ but no main parameter was defined
at com.beust.jcommander.JCommander.getMainParameter(JCommander.java:914)
at com.beust.jcommander.JCommander.parseValues(JCommander.java:759)
at com.beust.jcommander.JCommander.parse(JCommander.java:282)
at com.beust.jcommander.JCommander.parse(JCommander.java:265)
at com.beust.jcommander.JCommander.(JCommander.java:210)
at org.openqa.grid.selenium.GridLauncherV3$1.setConfiguration(GridLauncherV3.java:227)
at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:155)
at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:75)
Please let me know if am doing anything wrong in the above command.
You need to run it like this
java -jar -Dwebdriver.chrome.driver=chromedriver.exe selenium-server-standalone-3.5.3.jar

migrate Apache OFBiz from Apache Derby to mysql

I am using ofbiz in my organization. I want to migrate ofbiz from derby to MySQL.
I refer the steps from
(https://cwiki.apache.org/confluence/display/OFBIZ/How+to+migrate+OfBiz+from+Derby+to+MySQL+database) here, but at the i got stuck at the end.
At the end when I type (java -jar ofbiz.jar -install) this command I am getting an exception,
C:\Users\sagar_vinod_khanke\Sagar\Apache OFBiz\Ofbiz\13.07>java -jar ofbiz.jar -
install
Exception in thread "main" org.ofbiz.base.start.StartupException: Couldn't not f
etch config instance
at org.ofbiz.base.start.Start.init(Start.java:202)
at org.ofbiz.base.start.Start.main(Start.java:127)
Caused by: java.io.IOException: Cannot load configuration properties : org/ofbiz
/base/start/-install.properties
at org.ofbiz.base.start.Config.getPropertiesFile(Config.java:229)
at org.ofbiz.base.start.Config.readConfig(Config.java:297)
at org.ofbiz.base.start.Config.getInstance(Config.java:58)
at org.ofbiz.base.start.Start.init(Start.java:200)
... 1 more
Can you please help me?
don't use - with install.
See revised Step-V
Step-V
1. Run the following command from command prompt:
java -jar ofbiz.jar install
2. Start OfBiz
3. Use webtools to import all data from XML:
a. Navigate to http://localhost:8080/catalog/
b. Go to Applications>WebTools
c. Go to section 'Entity XML Tools' and click the link 'XML Data Import Dir' -> In the 'Absolute directory path:' enter the full path of the directory where you exported the data in Step - II

is use ubuntu juju sync-tools for openstack need bootstrap before?

I am use juju in my openstack environment .
After reading docs about juju , I know that , I need generate-image and generate tools for prepareation .
So , below is my steps:
glance image-create .... ; this step works well and give out an image ID
juju metadata generate-image ... -d ./jujuopenstack ; this step works well
juju metadata generate-tools .. -d ./jujuopenstack ; this step works well
juju sync-tools --source="https://streams.canonical.com/juju/tools" --debug --show-log
this step FAILED ! and tell me that I NEED bootstrap openstack environment .
( I have no choice but to bootstrap my environment )
juju bootstrap --debug --metadata-source /home/john/juju -v --show-log --upload-tools
this step will lanch a new instance , and can ssh into it .
the log is :
... ...
Running apt-get update
Running apt-get upgrade
Installing package: curl
Installing package: cpu-checker
Installing package: bridge-utils
Installing package: rsyslog-gnutls
Bootstrapping Juju machine agent
... ....
juju.environs.simplestreams simplestreams.go:465
fetchData failed for "http://cloud-images.ubuntu.com/releases/streams/v1/mirrors.json": cannot find URL "http://cloud-images.ubuntu.com/releases/streams/v1/mirrors.json" not found
juju.environs.simplestreams simplestreams.go:542
no mirror index file found
juju.environs.simplestreams simplestreams.go:428
read metadata index at "http://cloud-images.ubuntu.com/releases/streams/v1/index.json"
juju.environs.simplestreams simplestreams.go:432
skipping index because of error getting latest metadata "http://cloud-images.ubuntu.com/releases/streams/v1/index.json": index file has no data for cloud {regionOne htxxxxxx.0.33:5000/v2.0/} not found
juju.cmd supercommand.go:323
cannot set initial environ constraints: index file has no data for cloud {regionOne httxxxxxx7.0.33:5000/v2.0/} not found
juju.cmd supercommand.go:323
failed to bootstrap environment: subprocess encountered error code 1
............
==============================================================
I have no choice , then rerun sync-tools
juju sync-tools --source="htxxxxxxstreams.canonical.com/juju/tools" --debug --show-log
but told me that :
error dialing "wssxxxxx72.27.0.50:17070/", will retry: websocket.Dial wss://172.27.0.50:17070/: dial tcp 172.27.0.50:17070: connection refused
===================
What I want to know and make clear is , do we need bootstrap before using sync-tools ?
thanks in advance .