Middlemanapp: unknown extension - middleman

I run from console:
middleman build
and i get
== Unknown Extension: smusher
== Unknown Extension: favicon_maker
my Gemfile
source :rubygems
gem "middleman", "~>3.0.0"
gem "middleman-smusher"
gem "middleman-favicon-maker"
i run bundle install and bundle update.
What could the problem be here?

Inside the root of your project should be a config.rb file. Within that file you should add two extensions to the build configuratio:
configure :build do
activate :smusher
activate :favicon_maker
end
Middleman configuration Guide

Related

Fail building shopify theme app extension

I'm trying to build a theme app extension using CLI 3.0, I managed to create the extension on my app but I have 2 basic issues:
Whenever I add a js file to the assets folder or a liquid file to the blocks folder the build fails, even if the file is empty (build passes if I remove the file) - this is the error I get when running npm run build
Command failed with exit code 1: bundle exec theme-check /Users/omerdotan/projects/shopify-omer-test-app-2/extensions/omer-theme-extension-test-2 -C :theme_app_extension
The app doesn't appear on the theme - I attached the app to the store and enabled the developer preview for the theme extension,but it show no apps available (for both App embeds on theme settings and blocks)
I was running into similar issues.
My solution:
Install rbenv https://github.com/rbenv/rbenv, set required ~/.zshrc file using nano ~/.zshrc
Use rbenv to install latest Ruby version (3.1.2)
Target rbenv version to latest version by rbenv global 3.1.2
Reopen terminal and gem install bundler
Reopen shopify terminal and npm run deploy

cocoapod : pod setup failed with fatal error

I successfully installed cocoapod by using "gem install cocoapods". After that trying to set up pod by using "pod setup", but gives fatal error.
sh-3.2# pod setup
Setting up CocoaPods master repo
[!] Pod::Executable clone 'https://github.com/CocoaPods/Specs.git' master
Cloning into 'master'...
error: transfer closed with outstanding read data remaining while accessing https://github.com/CocoaPods/Specs.git/info/refs?service=git-upload-pack
fatal: HTTP request failed
please help me to solve this..
This issue appears to be just a temporary network issue. Try to verify if you can clone the https://github.com/CocoaPods/Specs repo in a folder manually.
1 - first install git (command line tool for mac)
link to download is : http://git-scm.com/download/mac
2 - then open commind line (or terminal) and type
$ sudo gem install cocoapods (you need to wait here , be patient)
3 - now you can shoot the command "pod --version" to check the version of the pod you just installed.
4 - Write again on terminal $ pod search libpusher (just an example of a library, you can type any library name here instead of 'libpusher' ).
5- let it be complete , it may take some time.
6- then most imp step , create the pod file , (name can be 'podfile') in your project directory and add it to your project in Xcode.
7 - Now Here the secret is : you need to provide the path to this pod file too here , so type command:
cd /Rakesh/vidyo_demo/vidyo_phonegap/ios (eg.)
after cd command rest is the path of the pod file directory.
8- and now when you will type 'pod install ' command in terminal.
and all libraries (which are written in podfile) will get installed on your project path. just then open the project which now has a workspace file. like demo.xcworkspace (open it)
9- here is the format of pod file:
platform :ios, '7.0'
pod 'libPusher', '~> 1.4'
This issue has been already reported to cocoapods.
Ok, after a few hours lost, it seems if my project path contains
single quotes or spaces, things fail. Sigh.

The --deployment flag requires a Gemfile.lock

I have spent couple of hours but unable to solve this problem.
When I try to deploy my local rails app to production server using capistrano I get the below error:
The --deployment flag requires a Gemfile.lock. Please make sure you have checked your Gemfile.lock into version control before deploying.
Any idea on how to solve this?
My rails application folder is under version control using Git. I have pushed the local git repo to github and the Gemfile.lock is there on github. So it is under version control. However capistrano continues to give the same error.
Deploy.rb file: https://gist.github.com/brahmadpk/4748991
Remove BUNDLE_FROZEN: "true" from .bundle/config file and run bundle again.
Make sure there is nothing in the releases folder that is not a release. See this comment on a bundler issue for more details.
This blogpost titled Capistrano Deployment Trouble explains the same issue.
EDIT TO INCLUDE CONCLUSION FROM DISCUSSION IN COMMENTS
The deploy_to param was not set to an absolute path; hence capistrano wasn't able to find the folder to deploy, causing this error message.
I solve this with:
set :bundle_gemfile, "your_app_name/Gemfile"
in the deploy.rb
Run bundle and add your Gemfile.lock to your version control.
I had the same problem, even though I had no files or folders in the releases folder. Turned out it was a silly little thing: the gemfile.lock file in my repo was in lowercase for some reason, while capistrano needs Gemfile.lock with a capital G.
This is how I solved it:
Delete gemfile.lock
Delete gemfile.lock from you repo (git rm ...)
run bundle install
add the new Gemfile.lock file to your repo: git add Gemfile.lock
remove the folders from the server (don't know if this is really needed, did it anyway)
deploy
After adding bundle config unset deployment this line in the terminal, bundle install started working again for me.
I am getting exactly the same problem.
There is nothing in my releases folder (at all - my deploy cold keeps rolling back).
My gemfile.lock is checked in to Subversion.
I get:
** [out :: localhost] The --deployment flag requires a Gemfile.lock. Please make sure you have checked your Gemfile.lock into version control before deploying.
Is there any way to stop the rollback so that I can see what the releases folder looks like at the time it tries to run
cd /var/qlarity/releases/20130222003607 && bundle install --gemfile /var/qlarity/releases/20130222003607/Gemfile --path /var/qlarity/shared/bundle --deployment --quiet --without development test
Later....
I found that I could prevent the rollback by commenting out the code as shown from
gems\capistrano-2.14.1\lib\capistrano\recipes\deploy.rb
task :update_code, :except => { :no_release => true } do
# on_rollback { run "rm -rf #{release_path}; true" }
strategy.deploy!
finalize_update
end
This enabled me to examine my releases folder and sure enough, there was no Gemfile.lock in it. Turns out I have ended up with an unnecessary folder in my Rails project file structure so that instead of
myapp/trunk/app
myapp/trunk/config
...
myapp/trunk/Gemfile
I had
myapp/trunk/myapp/app
myapp/trunk/myapp/config
...
myapp/trunk/myapp/Gemfile
This meant I ended up with a folder containing my Gemfile
releases/nnnn/myapp
and bundle was looking for Gemfile in
releases/nnnn
When I changed my Capistrano config from
deploy.rb
set :repository, "file:///D:/_SVN//myapp/trunk"
to
deploy.rb
set :repository, "file:///D:/_SVN//myapp/trunk/myapp"
now all is good. Really should look at fixing the folder structure next!

Capistrano bundle gems before sending to server

My servers don't have access to external resources (gems, etc), so I manually run
bundle package
then upload the code and run
bundle install --local
How can I get the same behaviour out of Capistrano? Using the Bundler recipe, tries to install the bundles on the server. Whereas I'd like to;
On the build machine
Checkout from SVN
run bundle package
zip and upload the artifact
On the application server
Expand the Zip artifact
run bundle install --local
start the server
I tried
after("deploy:update_code") do
system("cd #{copy_cache} && bundle package")
end
But that runs the checkout and upload, there didn't seem to be a place to attach after the checkout, but before the zip.
It seems the best way to do this is to, run bundle package on the development workstation, and then commit the bundled gems to source control, then run;
bundle install --deployment

How can I remove a gem from my Rails 3 project without getting this really strange Bundle error?

The error is:
You have modified your Gemfile in development but did not check
the resulting snapshot (Gemfile.lock) into version control
WHAT VERSION CONTROL? Why/how does Bundle know anything about version control? I just removed a line from my Gemfile. Am I not supposed to do that?
Do rm -rf .bundle && bundle install from your project root.