The stack I have been using for a while is Angular-restify-Mongo
I am wondering if there are any yeoman generator for them out there ?
If not .. what alternative generator can i use to quick start the project and then incorporate the missing elements ?
For now I found just this - https://github.com/kmees/generator-restify-live . It's restify generator.
Related
I'm using laravel 5.1 , I'm trying to do a migrate:refresh, I get an error :
Class 'Doctrine\DBAL\Driver\PDOSqlite\Driver' not found in
../vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php
[Symfony\Component\Debug\Exception\FatalErrorException] Class
'Doctrine\DBAL\Driver\PDOSqlite\Driver' not found
Doctrine/dbal is already required in my composer.json
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"Doctrine/dbal": "^2.5"
}
So I want to ask what is wrong in my laravel project.
From the official docs:
Before modifying a column, be sure to add the doctrine/dbal dependency
to your composer.json file. The Doctrine DBAL library is used to
determine the current state of the column and create the SQL queries
needed to make the specified adjustments to the column:
composer require doctrine/dbal
What worked for me is to delete the database.sqlite file and create an empty one.
I know this is not the best solution, but it fixed the issue in my use case.
Just a heads up, on Laravel 5.4 (paired with doctrine/dbal#^2.5 package), using the Blueprint::dropColumn() method works like a charm on SQLite databases. No Class 'Doctrine\DBAL\Driver\PDOSqlite\Driver' not found errors thrown.
Doctrine/dbal version 3 doesn't have Doctrine\DBAL\Driver\PDOSqlite\Driver class.
Make sure you are using doctrine/dbal version 2.
If you have version 3, you should remove it
composer remove doctrine/dbal
And then to install the version 2
composer require doctrine/dbal:2.13
Visit this link to see all available versions: https://packagist.org/packages/doctrine/dbal
Is there a way in rails, that I can only generate templates partially?
For example in my generators/generatorName/templates folder, there is template1.html.erb and template2.html.erb files
in console when I run the command
rails g generatorName
It will just generate by default the template1,html.erb.
and if I want to add the another template, how can I do that? Is there a way?
Sounds like you're looking for a custom generator. You'll need to create/copy the second file on invoke.
http://guides.rubyonrails.org/generators.html
First of all, I am new to both Grails and Vaadin, I'm trying to make it work according to docs. I am using Grails 2.2.4 and Vaadin 7.1.8.2. I installed the plugin using:
$ grails install-plugin vaadin 7.1.8.2
and put the plugin into BuildConfig.groovy:
compile ':vaadin:7.1.8.2'
I have made a basic Vaadin UI that works (even generated from Eclipse designer - great stuff), I can modify it and it auto-reloads. Fine. I got the URL mapping set in VaadinConfig.groovy so that I can use the traditional Grails CRUD controllers as well as my Vaadin UI:
mapping = [
"/vaadin": "app.MyUI"
]
contextRelativePath = "/vaadin"
I was hoping I could use the Vaadin-style CRUD scaffolding of domain classes as in http://mckenfra.github.io/grails-vaadin-plugin/source-code/docs/ref/Command%20Line/generate-vaadin-all.html but I can't generate it:
$ grails generate-vaadin-all "*"
| Script 'GenerateVaadinAll' not found, did you mean:
1) GenerateAll
2) GenerateViews
3) GenerateController
4) DbmGenerateChangelog
5) DbmGenerateGormChangelog
I'm getting the same if I try generate-vaadin-views or generate-vaadin-controllers. What could I be doing wrong ?
Thanks
You can try RefreshDependencies before GenerateVaadinAll.
ZF1 had a gread search lucene implementation. is there something similar for ZF2? I can't find anything...
It is part of ZendSearch and you'll find it here https://github.com/zendframework/ZendSearch
If you drill down through the folders you'll find Lucene, but you'll probably need to install the whole thing following the instructions in the readme file on the first page I linked to.
Alternatively you can cd into your vendor directory and run:-
git clone https://github.com/zendframework/ZendSearch.git
That will create the ZendSearch module and you can then add it to your modules list in application.config.php
Also see the Zend Framework package repository.
This is for Zend Framework 3 / Zend Search
The following code will get you started working with Zend Search:
use ZendSearch\Lucene\Lucene;
use ZendSearch\Lucene\Document;
use ZendSearch\Lucene\Document\Field;
use ZendSearch\Lucene\MultiSearcher;
$index = Lucene::create($path_to_index); // or use open to update an index
$document = new Document;
$document->addField(Field::Text($key,$value));
$index->addDocument($document);
$search = Lucene::open($path_to_index);
$search->find($str);
It is worth noting however that at the time of writing Zend Search expects ErrorHandler:: to be available which is part of the Stdlib of Zend. I believe this has been removed from stdlib so I simply replaced these calls with a try/catch block.
Beyond the above example - the code in the ZF v1 manual provides a pretty good basis to work from in terms of functionality: https://framework.zend.com/manual/1.12/en/zend.search.lucene.overview.html.
i've been looking several guidance about this in Grails official documentation site here
but still i couldn't make it runs well.
Supposed i created two plugin. myplugin-a and myplugin-b .
Each plugin had their own bootstrap that will execute when main app which install those plugins runs. I had include this line of code in MypluginBGrailsPlugin.groovy
def loadAfter = ['myplugin-a']
but still the plugin runs the bootstrap on each plugins with the following order :
myplugin-b -> myplugin-a .
Did i miss something here ?
Any help would be appreciated
You need to use the camel-case syntax of the plugin name: def loadAfter = ['mypluginA']. See https://github.com/grails-plugins/grails-hibernate-plugin/blob/master/HibernateGrailsPlugin.groovy for an example in the Hibernate plugin