Subgenerators for asp.net core with yeoman? - yeoman

I have just installed Yeoman, and generator-aspnet
Project is created, I go to the controllers folder to add a new controller, and I get an error .
I run
yo aspnet:MvcController Test
You don't seem to have a generator with the name “aspnet:MvcController” installed.
I do npm install aspnet:MvcController but it cant find it. What am I doing wrong?

Related

How to install Zendframework-2 in wampserver?

i already install git, and composer.exe now i try to install zendframework-2 but it not work please provide rightway for installing zend framework-2.
please provide me right tutorial or video for install proper.
It is possible to install ZF2 as a library but that's not what I recommend. I think it's best to install ZF2 in every project from composer.phar. This makes it easier to master the updates of applications in production.
For ZF2, install the skeleton application that allows you to set up your project. This installation sets up ZF2 complete.
Make sure your Windows path contains php.exe and composer.bat
paths ;
Run in console : php "path\to\composer.phar" create-project -sdev --repository-url="https://packages.zendframework.com" zendframework/skeleton-application "directory/of/your/project"
For ZF3, follow : https://framework.zend.com/downloads

yeoman creates project in Desktop even though I CD into directory

I am having a issue creating a yeoman project. I cd in the directory type yo and it says:
Here is it suppose to asked me project name etc and it wants to throw everything on my desktop not the file I cd into. It defaults to mvn and I want gradle. I even npm uninstall -g generator-jhipster
and reinstalled it and got the same issue.
If you have a .yo-rc.json file in a parent directory, Yeoman will load that configuration and generate from that file instead of prompting. This allows developers to run a yo command from any folder in the project and have it apply to the correct files.
To solve this, remove the .yo-rc.json from the parent directory, in your case /Users/drew/Desktop.
For example, if you are in the directory /Users/drew/Desktop/new-project but /Users/drew/Desktop has a .yo-rc.json inside, Yeoman will change to the parent directory (Desktop), load the configuration, and generate the files from that folder instead of the child folder.
Based on your log it's looks like you are running yo in a folder where a .yo-rc.json is already existing. Careful under windows the .yo-rc.json can be that is of type hidden and you can't see it in explorer. Because of an existing .yo-rc.json you are not asked anymore for info e.g. project name, build tool etc. My recommendation will be to create a new folder run inside yo command

yeoman generator creating files in home directory

I am using the yeoman angular generator https://github.com/yeoman/generator-angular#readme. I am following the instructions to install using the command npm install -g grunt-cli bower yo generator-karma generator-angular and then created a directory inside which I run the command yo angular myApp but the files are generated inside the home directory i.e ~/ The only directory I see inside angular-app is only the node_modules. Please help me understand where I am going wrong and how to fix this.
Found the answer after hours of searching on internet. The Gruntfile.js was in the home directory and it was referring to it. I deleted the file inside my home directory and all of it started working again. Here is the link, which might be useful if someone face the same issue - Link

Can not create rails apps anymore under Ubuntu

I have a problem with all my three! Ubuntu systems. I can't create any Rails projects anymore with the following command
rails new abcde
I get the following error message.
Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first
I know the error message is really clear, I googled and checked all the entries here on StackOverflow. No one had another explanation other than there is a project in a parent folder, which is not the case in my systems!
I checked all folders back to root for any hidden files resembling a rails project. Nothing! I even created a new folder under root /projects and tried to create a project in there, same error. I don't know what to do anymore, I have the same problem on all three of my Ubuntu computers. Has anyone ever had this problem and could fix it? What could be another cause of this. Because there is no project in any of parent folders.
The only possible solution for me is, that there is maybe a PATH variable for Rails that I don't know about and there is maybe a project in there?
SUGGESTIONS:
0) I'm assuming you're typing these commands from a console window, and not executing a shell script, shortcut, or "something else". Correct?
1) Please update your post with the following: ruby -v; rails -v (Ruby and Rails version info)
2) Please try another test project, and copy/paste any error or warning messages you see:
cd /tmp
rails new abc -f
<= another test "rails new", with "--force" option
3) Assuming you've installed RVM, and assuming your "rails new" is calling "run bundle install", then also make sure your user is a member of the "rvm" group:
sudo usermod -G rvm -a MYUSER
4) If you haven't already, please also look at these links:
can't initialize a new rails application within the directory of another
Problems with RVM and Rails when creating new app

"Can't initialize a new Rails application within the directory of another, please Type 'rails' for help."

I'm just starting out with rails and I'm practicing the basic ruby commands, one of which is the rails new myproject command.
My projects are under the Aptana workspace directory where I've used the command line and Aptana both to create projects there. After a few creations and rails s commands and deletions, I've started getting this error message when I try to generate a new rails project:
"Can't initialize a new Rails application within the directory of
another, please Type 'rails' for help."
This doesn't just happen when I create a new project (rails new myproject) under the Aptana workspace directory, but also when I use the command rails new . directly inside the workspace directory. Can someone explain to me what I need to do to flush rails so it knows I don't have a project there anymore? What did I do to make this happen?
I don't remember what rails looking for. The quickest way to solve this issue is to completely empty the affected directory.
Most likely there are some hidden files or directories which prevents rails from creating a new project. Look at that with ls -a probably there is a .bundle folder inside that dir.
I got same problem since I failed to create rails project. I tried to remove Aptana plug-in and Eclipe that include ./eclipse, ./metadata but not sloved the problem until I removed Ruby and Devkit and reinstall them again.
So, I think the root cause may in Devkit or Ruby. The problem work out after I reinstall Ruby(rubyinstaller-2.2.3-x64.exe) and DevKit(DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe).
If you are under Windows, you must install Aptana Studio as administrator or it will not work properly. Uninstall and install it as administrator and the terminal folder will be set correctly

Resources