Undefined method `FactoryGirl' -- upgrading from 2.0.2 to 3.4.2 - factory-bot

I'm in the process of upgrading from factory_girl (2.0.2 to 3.4.2) and factory_girl_rails (1.1.0 -> 3.4.0)
and I'm having issues with my rspec tests seeing factory girl.
I think I've successfully altered my factories to deal with the new syntax, and have removed the extra require statements that were bringing in multiple copies of the same files. My server now starts up, so I know that the factories.rb file is correctly getting parsed.
Now when I run my rspec tests, I'm getting this error:
NoMethodError: undefined method `FactoryGirl' for #
it 'can be created' do
course = FactoryGirl(:course)
….
end

With Factory Girl 3.4.2, you will need to explicitly use the create method.
course = FactoryGirl.create(:course)

Related

Undefined method [] for nil when trying to run cap deploy:restart

I have a Rails 5.2 app, and with cap 3.4.1 we are suddenly getting this weird error:
[b35efe76] Phusion Passenger(R) 6.0.8
DEBUG [b35efe76] Finished in 0.305 seconds with exit status 0 (successful).
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy#host.com: undefined method `[]' for nil:NilClass
Trying to narrow it down, it happens when attempting to restart, because this is the line that fails:
cap production deploy:restart
The question is, how do I go about finding what file is trying to call [] on a nil value on? Running cap with --trace is of no value because it just gives me internal errors - nothing in my code. Basically, how do I find out what is nil?
One more clue, currently, I have a bunch of servers, if I run the cap restart command on server A, it restarts fine, on server B, it throws this error, so I'm guessing there's an environment variable on server A but not B, but the error is just so opaque I don't know where to begin.
Thanks for any help,
kevin
A wild guess: I had a similar problem and I could solve it by upgrading capistrano-passenger to >= 0.2.1
Looks like the version change of passenger from 6.0.7 to 6.0.8 has introduces a problem. I see you are also on 6.0.8, so it might affect you, too!
Link to the capistrano-passenger issue

Rundeck won't start after patching (RHEL 7.8 latest patches added today)

Here is my error. Comes with a stacktrace but guessing this will be good enough. This project worked fine before the patches.
[2020-07-28T10:20:45,262] WARN services.ProjectManagerService - Discovered filesystem project RossNapOISOperations, importing...
[2020-07-28T10:20:45,824] ERROR boot.SpringApplication - Application run failed
grails.validation.ValidationException: Validation Error(s) occurred during save():
Field error in object 'rundeck.Project' on field 'description': rejected value [Build/Deploy/Maintenance on ROSS, NAP, and OIS Projects]; codes [rundeck.Project.description.matches.error.rundeck.Project.description,rundeck.Project.description.matches.error.description,rundeck.Project.description.matches.error.java.lang.String,rundeck.Project.description.matches.error,project.description.matches.error.rundeck.Project.description,project.description.matches.error.description,project.description.matches.error.java.lang.String,project.description.matches.error,rundeck.Project.description.matches.invalid.rundeck.Project.description,rundeck.Project.description.matches.invalid.description,rundeck.Project.description.matches.invalid.java.lang.String,rundeck.Project.description.matches.invalid,project.description.matches.invalid.rundeck.Project.description,project.description.matches.invalid.description,project.description.matches.invalid.java.lang.String,project.description.matches.invalid,matches.invalid.rundeck.Project.description,matches.invalid.description,matches.invalid.java.lang.String,matches.invalid]; arguments [description,class rundeck.Project,Build/Deploy/Maintenance on ROSS, NAP, and OIS Projects,^[a-zA-Z0-9\p{L}\p{M}\s.,()_-]+$]; default message [Property [{0}] of class [{1}] with value [{2}] does not match the required pattern [{3}]]
That's related to how Rundeck 3.3.X interprets the project description after an instance upgrade, a good way to solve it is back to rundeck 3.2.X, edit the projects descriptions without "special characters" and update to Rundeck 3.3.1 again. You can add your issue to this GitHub thread.

Uncaught TYPO3 Exception: Cannot use object of type __PHP_Incomplete_Class as array

Core: Exception handler (WEB): Uncaught TYPO3 Exception: Cannot use object of type __PHP_Incomplete_Class as array | Error thrown in file typo3/sysext/backend/Classes/Controller/Page/TreeController.php in line 189
This happened after a core update to TYPO3 - 9.5.17
https://forge.typo3.org/issues/91407
The following thanks to Michael Hitzler.
As far as I can see there is already a solution within the install tool in class BackendUserConfigurationUpdate.
This seems to address exactly the issue.
Not quite sure in which version the additional migration task has been added, but it helps you solving the issue system wide.
Just got to module Admin Tools -> Update and select Update Wizard.
There you should see a new, not yet executed migragtion task:
Update backend user configuration array
The backend user "uc" array, which is persisted in the db, now only allows for arrays inside its structure instead of stdClass objects. Update the uc structure for all backend users.
Execute this migration task and your BE users will be updated and have a sane uc configuration in the end.
Problem solved and page tree can be loaeded again.
./typo3cms upgrade:wizard backendUsersConfiguration
Should solve the issue.

Error upgrading Jasperreports server from 7.2 to 7.5 (keystore problem)

The upgrade procedure is pretty simple and well documented. I have been upgrading jasperreports server since version 4 always using the same procedure (buildomatic).
Now, in 7.5 version I get
java.lang.RuntimeException: KeystoreManager was never initialized or
there are errors while instantiating the instance.
Failed to instantiate
[com.jaspersoft.jasperserver.crypto.KeystoreManager]: Please make sure
that create-keystore was executed;
Error creating bean with name 'keystoreManager': Invocation of init
method failed;
Error creating bean with name 'passwordEncoder': Unsatisfied
dependency expressed through field 'keystoreManager';
The keystore is in /root folder, as it should.
Have you tried the process mentioned in this link https://community.jaspersoft.com/wiki/encryption-jasperreports-server-75
"If the JasperReports Server cannot find the keystore files - maybe because of permissions as noted above, you will get an exception on server start like:
Failed to instantiate [com.jaspersoft.jasperserver.crypto.KeystoreManager]: Please make sure that create-keystore was executed; nested exception is java.lang.RuntimeException: KeystoreManager was never initialized or there are errors while instantiating the instance.
To fix this, you need to move the keystore files into a directory that is accessible by the user running the web app process. See Updating keystore files below."

TYPO3 Upgrade Wizard Fails on DatabaseRowsUpdateWizard

i updated a project from TYPO3 7.6 to ^8 by following the official guide. latest steps were the composer update. i removed extensions/packages not compatible with ^8 and updated the ones available for ^8. im able to reach the install tool, the TYPO3 admin backend and the frontend (with errors).
so i ended up at the step were i should use the upgrade wizards provided by the install tool. i completed a few wizards without any issues but then faces a pretty one - first i tried to run DatabaseRowsUpdateWizard within the install tool but that failed with a memory error - i tried the cli approach with
php -d memory_limit=-1 vendor/bin/typo3cms upgrade:wizard DatabaseRowsUpdateWizard
the processing worked but it ended up with following error:
[ Helhum\Typo3Console\Mvc\Cli\FailedSubProcessCommandException ]
#1485130941: Executing command "upgrade:subprocess" failed (exit code: "1")
thrown in file vendor/helhum/typo3-console/Classes/Install/Upgrade/UpgradeHandling.php
in line 284
the command initially failed is:
'/usr/bin/php7.2' 'vendor/bin/typo3cms' 'upgrade:subprocess' '--command' 'executeWizard' '--arguments' 'a:3:{i:0;s:24:"DatabaseRowsUpdateWizard";i:1;a:0:{}i:2;b:0;}'
and here is the subprocess exception:
[ Sub-process exception: TYPO3\CMS\Core\Resource\Exception\InvalidPathException ]
#1320286857: File ../disclaimer_de.html is not valid (".." and "//" is not allowed in path).
thrown in file typo3/sysext/core/Classes/Resource/Driver/AbstractHierarchicalFilesystemDriver.php
in line 71
im pretty much lost and dont know were to start to get this fixed - help is much appreciated
Issues like these usually stem from broken URLs in RTE fields as can be seen in the error output:
File ../disclaimer_de.html is not valid (".." and "//" is not allowed in path)
In this case you should manually prepare the database and run SQL statements which replace the broken/obsolete ../ prefix from all affected records. An example query:
UPDATE tt_content
SET bodytext = REPLACE(bodytext, 'href="../', 'href="')
WHERE bodytext LIKE '%href="../';
Notice that this query is very basic and can destroy your data, so make sure you run some SELECT statements first to make sure nothing breaks. Also keep a backup of your database at hand.
Sometime, custom or TER extension also have RTE such as tt_news where you might come across same issue. To fix that, you just need to run the same query with the according table.