Init grpc in flutter project - flutter

I create flutter project with grpc, but I get error, when try to generate file dart from proto. I put proto files in lib/protos (rewards.proto), then in terminal put command
'protoc --dart_out=grpc:lib/src -Iprotos protos/rewards.proto'
and I receiver error like this --dart_out: protoc-gen-dart: ═х єфрхЄё  эрщЄш єърчрээ√щ Їрщы.
What I do wrong ? (Sorry for my English):)

Follow this official installation docs : grpc-dart
I hope you downloaded the protoc-plugin. You can do it using
$ dart pub global activate protoc_plugin
If you had already done this, add dart to path, You can do this
export PATH="/path/to/.pub-cache/bin:$PATH"
export PATH="/path/to/dart-sdk/bin:${PATH}"
ps : The error you got is due to path related issues. The above two commands might help

Related

Target URI doesn't exist, when trying to import a package in flutter

I have stumbled upon a problem in importing the package in Flutter, I tried to solve this by running flutter packages get and also shutting down the project in Android studio and reopening it.
import 'package:task_02_category_widget/category.dart';
Here is the line above, and the error I'm running into when I run it gives the following error in the console.
Your application could not be compiled, because its dependencies could
not be established.
The following Dart file:
/Users/username/Documents/flutter_rectangle_2/lib/main.dart
...refers, in an import, to the following library:
package:task_02_category_widget/category.dart
That library is in a package that is not known. Maybe you forgot to
mention it in your pubspec.yaml file?
If task_02_category_widget/category.dart is part of an old project you are reusing you should put it in a folder in your flutter application and include it like "../ folder /task_02_category_widget/category.dart ". If it is part of github repository you have copy pasted from, just copy the file and use the step above. Most probably you are looking for that . In any other case check here to find the source code.
You should have in your project at a file called pubspec.yaml a definition like this:
name: my_app
dependencies:
task_02_category_widget:
Let’s say that your package is laid out as follows:
task_02_category_widget/
lib/
category.dart
Then, you can import it:
import 'package:task_02_category_widget/category.dart';
More information:
https://www.dartlang.org/tools/pub/get-started
https://www.dartlang.org/guides/libraries/create-library-packages

sails­postgresql Error while using sails lift command?

While running $ sails lift command , I am getting this error.
info: Starting app...
error: Trying to use unknown adapter, "sails­postgresql", in model `adminintro`.
error: Are you sure that adapter is installed in this Sails app?
error: If you wrote a custom adapter with identity="sails­postgresql", it should be in this app's adapters directory.
error: Otherwise, if you're trying to use an adapter named `sails­postgresql`, please run `npm install sails-sails­postgresql#0.10.x`
Please help me out guys ...
Got the answer ... It was unicode mistake . I have copy n pasted the code for local.js from one of my coworker's pdf file. So when I pasted that code in my local.js "-" was replaced with some unicode http://www.fileformat.info/info/unicode/char/00AD/index.htm .. and that was causing this issue..

How can I get Compass to work in Visual Studio via NuGet?

My developer friend who has the luxury of developing in a non-Windows environment has been raving about Compass. I finally decided I wanted to give it a try. I'm tired of trying to keep up with all of the intricacies of cross-browser CSS.
So, I found it on NuGet, and installed it.
I installs to my solutions root directory in the packages directory:
$(SolutionDir)packages\Ruby.Compass.0.12.2.3\
It comes with a Readme that states the following message:
Ruby Compass v. 0.12.2
Compass is installed in its own NuGet package dir, and available by
'compass' command in "packages\Ruby.Compass.0.12.2.3" folder.
To compile Compass files during build, add the next line to the
project pre-build events:
"$(SolutionDir)packages\Ruby.Compass.0.12.2.3\compass" compile
"$(ProjectDir)."
So, I placed the line in my pre-build events, saved, and tried to build my project. However, I get an error as follows:
The command
""$(SolutionDir)packages\Ruby.Compass.0.12.2.3\compass" compile "$(ProjectDir)."" exited with code 1.
Notice: It actually shows the full path to the ProjectDir and SolutionDir as it's supposed too in the error message. I replaced them with the tokens to keep the project name unanimous.
Let me mention that I tried variations of the suggestion pre-build line:
"$(SolutionDir)packages\Ruby.Compass.0.12.2.3\compass" compile "$(ProjectDir)"
"$(SolutionDir)packages\Ruby.Compass.0.12.2.3\compass" compile "$(ProjectDir)css"
"$(SolutionDir)packages\Ruby.Compass.0.12.2.3\compass" compile "$(ProjectDir)css\test.scss"
The first one just removed that trailing .. The second one pointed it to the directory where all my css files are stored. The third one pointed it to the exact file I was trying to compile was located.
I opened up compass.cmd which is the file it is calling, and it looks like the following:
#echo off
"%~dp0ruby\bin\compass" %*
I'm assuming this calls the compass file in the ruby/bin folder, which looks like this:
#!C:/downloads/ruby-2.0.0-p247-x64-mingw32/ruby-2.0.0-p247-x64-mingw32/bin/ruby.exe
#
# This file was generated by RubyGems.
#
# The application 'compass' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
version = ">= 0"
if ARGV.first
str = ARGV.first
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
if str =~ /\A_(.*)_\z/
version = $1
ARGV.shift
end
end
gem 'compass', version
load Gem.bin_path('compass', 'compass', version)
From there, I'm not sure what is going on. I'm not a Ruby person.
Is there an issue that I'm overlooking here?
Has anyone else been able to install Ruby.Compass via NuGet?
How can I get this working in Visual Studio without having to fight with Ruby?
From: http://codewith.us/automating-css-generation-in-visual-studio-using-sasscompass/
"Note that, if there are issues with your SCSS files, you will receive some variation of the error below.
Error 36 The command "del "C:Projectspubliccss*.css" /S
compass compile "C:Projectspublic" --force" exited with code 1.
Open your Output window (click View -> Output or press Ctrl+W, O), and select “Build” in the “Show output from:” menu. Scroll up until you find your command in the log and you should get a little more insight into what portion of the command failed."

specifying nuget package sources

My build server fails to build because the package source cannot be found. Here's how I want to specify it:
<PackageSources><add key="My Feed" value="http://tfs2010:90/CompName.Nuget.Web.$(Configuration)/Nuget" /></PackageSources>
The error:
C:\TFS2010\TFS\Nuget\nuget.Other.targets (43): The command ""C:\tmp\nuget.exe" install "C:\Builds\1\PC\PackNameSources\PackName\packages.config" -source -o "C:\Builds\1\PC\PackName\Sources\packages"" exited with code -1.
Now, of course if I do that:
<PackageSources>"http://tfs2010:90/MyFeed/Nuget"</PackageSources>
then it works fine.
The problem is that eventually, I want to specify multiple sources.
How can I do that and what am I doing wrong ?
the solution was to separate the sources with a semi-colon :
<PackageSources>"source1; source2"</PackageSources>

Symfony2 : How to make the php_intl extension available for Symfony2?

I'm trying to follow this documentation on Symfony : http://symfony.com/doc/current/book/forms.html
ok so here is my thing, I've externalised my form and created a specific form class for handling the process and being able to reuse it.
So what happen when I submit the form, whatever the info are okay or not for my class, I get this fatal Error :
Fatal error: Call to a member function setAttribute() on a non-object
in C:\Program Files
(x86)\wamp\www\QNetworks\vendor\symfony\src\Symfony\Component\Form\Extension\Core\DataTransformer\NumberToLocalizedStringTransformer.php
on line 130 Call Stack
I'm running with php 5.3.9 and my intl extension is installed and activated BUT when I run the app/check.php command I see :
[[WARNING]] Checking that the intl extension is available: FAILED
* Install and enable the intl extension (used for validators) *
So I don't understand what the problem with this extension. Should I reinstall it ?
When I go here : http://php.net/manual/en/intl.requirements.php
I see tht i can install the PECL or the ICU library, but i don't know if I should and if there is any relation with my problem ..
Your Intl extention must be configured propertly.
Check on your server if this really activated using phpinfo()
then on your php.ini activate logging:
[intl]
intl.error_level = E_WARNING
extension=php_intl.dll
and check logs
If it's activated maybe it's a malfunction. Try to redownload the dll into c:\PHP\ext\php_intl.dll
take care you have two php.ini :
*wamp\bin\php\php5.3.13
*wamp\bin\apache\apache2.2.22\bin
you should uncomment extension=php_intl.dll in both.
After enable intl extension, you need copy some files to apache bin directory. It could help you: http://www.youtube.com/watch?v=gtIcpdPzXiE