Breakpoint in Rails app - import

I've been told by Mason Wendell that I can use Breakpoint in my application without Compass.
I have gem 'breakpoint', '2.4.1' in my Gemfile and #import "breakpoint" in my application.css.sass but it fails to locate Breakpoint.
Mason stated "Just get your import paths to find the _breakpoint.scss partial and you should be all set.".
I'm a bit confused about how to actually do this.
Any ideas?

There are two styles of using Sass dependencies:
Fetch with RubyGems, apply with a pathless #import 'breakpoint';, made possible by Compass.
Fetch manually with Bower into a subfolder within your project folder, apply with a relative #import 'bower-components/breakpoint/stylesheets/breakpoint'.
There is a way to import Sass dependencies with a pathless #import of a RubyGems-installed dependency and without Compass: put the directory of where RubyGems stores Breakpoint into Sass' load_paths parameter. But you should consider this a workaround rather than a normal workflow.

Related

Swift mongoc.h file not found

I am trying to install the Mongo Swift library using cocoapods but am fronting some problems.
As the documentation pointed out, for the mongo swift pod to work, it needs the mongo-c-driver. Which I installed using homebrew and is sitting in the Cellar folder in my usr folder(Meaning it is installed). I then modified the podfile the same as the example and when running pod install the library is correctly installed.
The problem then comes when i open the project and try to build it. I have now these two errors:
'mongoc.h' file not found
Could not build Objective-C module 'libmongoc'
I made sure that I open the xcworkspace and not the default workspace.
I also tried to add the path to the mongoc.h file to the Runpath Search Path in hope of some results but without luck.
As you may see i do not understand a lot of this and it basically could be something silly. But I do not know how to get this library to work.
So i managed to get it to work.
I don't know why this happened but the header and library search paths were set wrongfully. I had installed version 1.10 of the mongo-c-driver and the search version in xCode was set to 1.94.
I also was trying to modify the search paths in my own project rather in the cocoa project which led to absolutely no results.
TLDR; Add the correct include and lib folder to the Header/Library Search Path in Xcode and make sure you set it in the Pods Project.

How do I tell Babel-loader to ignore package.json `main` entry?

I'm developing a library of components, which is using Lerna. This means each component directory has a package.json file. I also have a dist in each of them. That's where the bundle yields to, obviously. My issue occurs while developing. My import statements encounter the package.json and try to get the source from dist instead of an index.js, where the source lives. How can I mitigate that so the require process avoids the package.json?
Ok, apparently I found my answer in Webpack docs, but it wasn't that easy. You have to add a module key (in addition to main) to let the Webpack resolver know which source to load while in modules environment (development).
See here: https://webpack.js.org/configuration/resolve/#resolve-mainfields

Where does Compass look for files to import?

When writing an #import statement in an SCSS file how does Compass know where to look?
I don't think this has been answered very well and I'm unable to find anything in the documentation.
I've been browsing the folders for the various Ruby gems and at one point I thought that any folder called stylesheets got added to some list somewhere (but where??). This can't be the whole explanation, however, since I've also seen #import's referencing files that are not inside such a folder. I also haven't been able to find any config files defining this inside the gems.
Where is this information located or how is it generated?
From http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#import:
"Sass looks for other Sass files in the current directory, and the
Sass file directory under Rack, Rails, or Merb."
You can shortcut imports by keeping them alongside the importing file and naming them "_[filename].scss" Then import them with #import "[filename]"
Compass scss/sass files are on your gem path:
gems/compass-[version]/frameworks/compass/

MGTwitterEngine for Iphone SDK errors

I'm trying to get MGTwitterEngine to work for the iPhone SDK. I've followed the read me below and now I keep getting the following errors:
TCDownload.h: No such file or directory
yajl_parse.h: No such file or directory
Now, I've done a search on my system and don't have either one of them. So am I missing something? Also, I've downloaded the MGTwitterEngine code within the last couple days from gitub.
READ ME
Add libxml2.dylib in Other Frameworks. You'll find the library in:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/lib/libxml2.dylib
Add "$SDKROOT/usr/include/libxml2" as a Header Search Path in your Project Settings.
Although I've never used MGTwitterEngine, that error basically says that you are missing yajl library.
You can install it manually by doing (I assume you install to default /usr/local location):
git clone git://github.com/lloyd/yajl
cd yajl
./configure
sudo make install
Then in your xcode project:
Add libyajl.dylib or libyajl_s.a (dynamic/static - whichever you prefer, either should be located in /usr/local/lib/) to 'external frameworks and libraries' in your project tree. In project settings add "/usr/local/include/yajl/" and (possibly) "/usr/local/include/" to Header Search Paths (in Search Paths section).
After that it should build.
On mac, you can use port (See how to install here)
After install simply type in terminal :
sudo port install yajl
And like ttvd say before:
In your xcode project:
Add libyajl.dylib or libyajl_s.a (dynamic/static - whichever you prefer, either should be located in /usr/local/lib/) to 'external frameworks and libraries' in your project tree. In project settings add "/usr/local/include/yajl/" and (possibly) "/usr/local/include/" to Header Search Paths (in Search Paths section).
This works if you don't care about YAJL:
"Guys – the yajl/yajl_parse.h error is confusing and the reason the demo works is that the files that need yajl are excluded from building, even though they’re in the project. To fix in your own project go into the MGTwitter folder via xcode and select each .m file with the term yajl in it (there should be 6), right-click -> Get Info -> Targets tab and uncheck the box next to your app name. HTH, Jon"
One of the comments on http://aralbalkan.com/3133
I am just going to add something because I think it is important and I usually hacked around it in the past.
---->>
The header search paths are defined in project settings but are over-ridden in the target settings so if you are having problems including certain files check the header search paths that are set in your target settings. If they are bold then they are being used and overriding the default settings for the project.
dl and install this: http://cmake.org
before
git clone git://github.com/lloyd/yajl
cd yajl
./configure
sudo make install
then add the dylibs and you should be ok!

.dylib linked in Debug, not found for Release for iPhone in XCode

So I have included the libxml2.2.dylib library into my iPhone XCode project to create some Xml and XPath parsing utilities. When I compile and run in Debug mode for both the Simulator and Device I have no problems, however, When I switch to Release mode I get...
"error: libxml/tree.h: No such File or directory" as well as other similar errors for the following .h files.
#import <libxml/tree.h>
#import <libxml/parser.h>
#import <libxml/HTMLparser.h>
#import <libxml/xpath.h>
#import <libxml/xpathInternals.h>
What do I need to do to ensure the libary is included and linked to the Release build?
An error on the .h is a compile-time error with your Header Search Paths, not a .dylib or a linker error.
You have to ensure that ${SDK_DIR}/usr/include/libxml2 is in your Header Search Paths in your Release configuration.
i was going around in circles this morning with this same problem with xcode 4.
again as described exactly above, it builds with fine with
Schema >
Build Configuration
--> Debug
but fails when switching it to Release
tried numerous cleans and
adding ${SDK_DIR}/usr/include/libxml2 or
$/usr/include/libxml2
and triple checking Header Search Paths / checking the recursive check box all to no avail.
Was about to start a new project when ....
I managed to resolve it by adding
${SDK_DIR}/usr/include/libxml2 to the User Header Search Paths
do make sure that libxml is included in your project , that was the one that caused the problem for me.
add libxml2.2.7.3.dylib to linked libraries