Jekyll assets get deleted - ruby-on-rails

I'm using jekyll to build a simple static website. My _config file is basically the default. I have an issue with including images in my website.
I have an images directory inside my _site/assets directory (which I simply copy pasted into). Upon running the website with bundle (locally), the images folder gets deleted from the directory. If I copy it back there then the images are properly shown on the site, but upon refresh they are deleted again.
As I understand it, I need to build the folder using bundle so it doesn't delete it, but the exact way this is done is unclear to me. Can someone please explain what is happening and how I could fix it?

I have an images directory inside my _site/assets directory (which I simply copy pasted into). Upon running the website with bundle (locally), the images folder gets deleted from the directory.
The _site folder is deleted and rebuilt after every change or jekyll build execution. You should put your files in the /images/ directory in the main project folder.
As I understand it, I need to build the folder using bundle so it doesn't delete it, but the exact way this is done is unclear to me. Can someone please explain what is happening and how I could fix it?
In Terminal, navigate to the root directory of the specific jekyll folder (e.g. /theme-name/) and use the command jekyll buildto rebuild the _site folder reflecting any changes you've made.

_site folder gets regenerated in each build, it is where jekyll outputs the final site.
You should place the images folder at the root directory, so it will be copied by Jekyll to _site/images.

Related

Replaced resources group in project with resources directory, Codesign failure at build

I was trying to access directories and files loaded locally onto my app, and followed the answer found at this thread.
It told me to create a Resource folder locally within my project directory, and then drag that folder into my project in XCode. Well, I already had a Resource group there that I wanted to replace, so I deleted it. After moving the Resource directory in and building my app, I receive this error:
I've added the whole resources directory to my build phase copy bundles:
I've also tried this popular solution to codesign exit errors:
xattr -rc . within my derived data directory, and root directory of my app.
Finally, I've tried deleting my projects derived data, and none of the above seems to work.
This must be some sort of conflict error, like I either didn't get rid of the Resources group (it came with the project when created...) Or I didn't introduce the new resource directory correctly. But, I'm not sure what to do...
Fixed this by following the solution found here:
Solution
Basically I had to recreate the Resources group, drop all of my resources there, then follow the instructions found in the answer of the linked thread. Involved me 1st deleting the derived data folder for the project, then running xattr -rc . within the project directory.

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

accidentally removed log folder in rails .gitignore, log folder not being generated on pull request

I'm new to git and rails. I checked out a rails project and had a bunch of log files come in with it. I wanted to remove the log files and add an entry into .gitignore to ignore contents of the log directory. I think I screwed up because when my colleague tried to checkout from master, his log directory didn't even get generated. I think instead of ignoring contents of the log file, I ignored the entire log directory. What's the best way to change this .gitignore file to only ignore log files NOT the log directory itself? Also I don't think I need all these things in the .gitignore. What's a nice clean and simple .gitignore for a rails project?
*.sublime-*
.bundle
db/*.sqlite3*
log/*.log
*.log
tmp/**/*
tmp/*
Gemfile.lock
doc/api
doc/app
*.swp
*~
.DS_Store
Thank you in advance.
Git ignores empty folders, in fact it doesn't really know they exist (it knows about trees pointing toward file contents). Since there is no file content to point to, there is no tree and hence git will not create a folder.
Common way around this is to add empty file within the folder. Convention is to name this file .keep. Add such file to the empty folder, add it to the index, commit and push and folder will be created on checkout.

Can't link to my bower_components folder using google web-starter-kit

My problem is I can't link to the bower_componets folder.
I am using web-starter-kit, and basically took those files into my dev environment/folder structure. I know that defeats the purpose of WSK, however I created a gulp work flow and wanted to try it out.
This is what i get in the console.
And this is my folder structure...
I am positive based on where the 'bower_components' folder exists this should be the path.
<script src="../../app/_bower_components/flowtype/flowtype.js"></script>
e.g. Start out of in development, then out of builds and dive into 'app'
Is there a bower config file that I am supposed to create?

Cannot load angular.dart

During the reproduction of this example, something strange happend: https://github.com/dart-lang/dart_by_example/tree/master/example/angular/basics/conditionally_switch_between_dom_elements
So created a plain Dart project in WebStorm, added angular.dart, copied the example. Everything works well, if the files are "web" directory.
BUT, after I moved the three files into a switch subdirectory, I have the following problem:
An error occurred loading file: package:angular/angular.dart
Do you have any idea? What did I missed.
If you added the subdirectory after you ran pub get then it may not have the packages symlink folder. Try running pub get (from your apps root directory) again which should generate any missing packages in subdirectories that may have been added, without re-downloading any dependencies.

Resources