I'm moving my application from Structure Map 2.5.3 to 2.6.2 and I'm having some scoping problems.
In 2.5.3 version I used CacheBy(InstanceScope.HttpContext) to have instances disposed at the end of Http request. Now in 2.6.2 I tried both HybridHttpOrThreadLocalScoped and HttpContextScoped but my injected instances do not get disposed.
Any solutions?
Those classes which were not disposed were in another project still referencing 2.5.3. It works fine now after fixing the references :)
Related
I'm using graphql 1.9.21 with rails 5.2.0 application. When I make changes to the graphql query_type or any other graphql related files such as(graphql_controller, type files, etc), I need to restart the rails server everytime. Otherwise, changes do not get reflected in the response. Changes in other models etc are working fine, but only issue with the Graphql generated file.
I'm also using graphql-pundit 0.7.1 not sure if it is causing any issue.
Thank you!
Looks like some issue with the namespacing.
Adding :: before the Types solved the problem.
class MyXyzSchema < GraphQL::Schema
mutation(::Types::MutationType)
query(::Types::QueryType)
....
....
end
I'm trying to upgrade a project to Spring Data Neo4j 4.0.0 and I'm facing two problems :
The "spring-data-neo4j-rest" package is missing at MvnRepository (spring-data-neo4j-rest-4.0.0.jar returns 404 error). Does the package still exist and should be there, or should I just delete the dependency from my pom.xml?
I've got the following error : The method fetch(Set<...>) is undefined for the type Neo4jOperations in all my DAOs. The method was used to initialize collections of lazily loaded nodes. How can I initialize a node's collections?
Thanks!
Did you read the migration guide that's provided for SDN 4?
http://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#migration
fetch is gone and replaced by fetch-depth
SDN-rest is gone too any not needed anymore (as SDN-4 is all about remote connections).
I was using ember as a part of my grails application, All libs were provided by a ember grails plugin 1.7. As I would eventually like to move to newer version I have tried both to replace ember and ember-data with newer files versions as well as to add references to hosted files, but I would always get during run:
template.buildRenderNodes is not a function
My guess from that error message would be you are still referencing handlebars rather than htmlbars which Ember now uses. You now need ember-template-compiler.js, see http://emberjs.com/builds/#/release.
As Christopher mentions, you will probably feel less pain by going up a version at a time and also moving to Ember CLI if you haven't already
I've tested this by running rails c both before and after git stash. On Rails 4.1 in Mavericks, after following the instructions to add the versions table and adding has_paper_trail to three models, whenever I run rails c I get
irb: warn: can't alias context from irb_context.
I've spent some time Googling without much luck, there's old threads talking about rspec, but I don't see how that's relevant since I'm not using it. Any ideas why this is happening?
RSpec used to polute provide Object top-level methods, e.g. describe, context, etc. Fortunately they've got rid of all the monkey patching in version 3, and now all these methods are namespaced under RSpec.
One can change this behaviour through the expose_dsl_globally config flag. For backwards compatibility, it defaults to true.
The warning shows up when you open the console because paper_trail automatically loads its rspec helpers when rspec is found. And it calls RSpec.configure before you have the chance to tweak your own configuration.
One possible solution would be paper_trail to disable the automatically loading and let users to load it themselves when they see fit. However, I am not aware of the internals of the library, so I can't guarantee this wouldn't break other things.
Best!
This is now fixed in papertrail 4.0.0, here's the commit.
My project has always used grails 2.0.1 and my controllers define their actions as methods not closures. Previously these actions have always worked (i.e. the browser can render the correct gsp page first going through the action method in the controller).
Recently we've noticed that the bespoke actions no longer work, the browser reports a '404 resource not found'. We're still on grails 2.0.1, this is confirmed by 'loading grails 2.0.1' comments in every grails command that is run. Although there are some controller/domain/services changes, none of those changes should affect the use of action methods. From what I can tell, we've not downgrade the version of grails/groovy.
If I change the actions to be defined as closures, then it works fine. But I'm not happy with this as my solution as methods are the preferred way and it used to work.
I've tried the usual approach to grails weirdness: proper clean and rebuild, but no joy. Also, this is an issue in both eclipse and unix envs (project delivered as a war run by the grails command), so it must be something in the project files but I cannot spot anything that has changed.
Any suggestions what could have happened to my project and how to resolve?
I've finally tracked my problem down to an aspect I was using to monitor long running method calls. I had changed the pointcut to include 'within(com.mydomain.domain..*)' which is where my Controller class resides. This appeared to stop my bespoke links from working, not entiring sure why. I hadn't intended this, I just wanted my pointcut to include all domain class methods but I'm happy to sacrifice that in order to get controller method actions working again.
I've resolved this issue by amending my pointcut.