Is there a way to update just one bundle without updating every bundle in your deps file? I am currently using "php vendors install" to install all vendor bundles and am not aware of any commands that will update just one bundle at a time.
1) Just open your deps file (./deps)
2) Remove all bundles except the one you want to update and save the deps file
3) Let's run the command: php bin/vendors update
It will update the bundle.
4) Go back in your deps file and rewrite all the previous removed bundle lines !
Cheers !
Short version:
The "best way" to do this depends on your setup. If you've run "php bin/vendors update" before, then it would probably be best to remove the line for the bundle you want to update from your deps.lock file, then run "php bin/vendors install" from your base symfony folder.
Long version:
I think some clarification of what the various vendor commands do is in order.
1) php bin/vendors install
This command downloads (if necessary) and installs vendor bundle source files into symfony/vendor. This command will first look at deps.lock to see what git commits/versions are listed there, then it will look at your deps file to see what versions are listed there. If no version is specified in either for a certain bundle, it will download the most recent version of the bundle code for that bundle. If a version is found, it will download and install that version of the vendor bundle code.
This command will not put anything in deps.lock.
2) php bin/vendors install --reinstall
This command does the same thing as php bin/vendors install, except it will always download the code before installing it into symfony/vendor.
This command will not put anything in deps.lock.
3) php bin/vendors update
This command will ignore deps.lock, and will download (if necessary) and install the versions of bundle code listed in the deps file into symfony/vendor.
After it is done downloading and installing code, it will put the git commit id / version of the downloaded code for each bundle into your deps.lock file. That way, when you go to run one of the install commands listed above, the version of code that is downloaded won't change unless you remove the related line from the deps.lock file or if your run the update command again.
The idea behind the deps.lock file is that it prevents you from accidentally upgrading your bundles to a more recent bug non-working version of the 3rd party bundle code. Symfony and it's bundles are under constant development, so changes (even if they're not bugs) happen pretty frequently and will break your code. You'll probably want to get your versions locked down in deps.lock as soon as possible and only update when you feel like going out of your way to do so.
Once you've locked down your bundle versions in deps.lock, you'll just need to remove the related line from your deps.lock file the run one of the install commands to update a specific bundle, like I said in the short answer above. If you then want to lock that code down to the version you just installed, you'll want to add a line to deps.lock yourself, or remove everything from deps and run php bin/vendor update like the answer above indicates.
Related
Handed a project that has a composer.json that has all package versions listed as "*" and has no composer.lock file
In the original project, running composer show, tells me all versions of everything installed. Excellent.
Running the project on a different machine, running composer install gets all the latest packages, which breaks the project because major updates mess with everything.
I'd love to know if it's possible to trade out all those "*"'s with caret version numbers utilising composer show --save-dev or something similar. Perhaps only possible by running a script or installing something?
Currently, when you Get Latest from source control, and the bower.json or package.json files have changed, you still need to open and make a minor change to the file and re-save it in order for VS to be aware of the change and execute NPM or bower and pull updates. Ideally, it would detect the change and execute it immediately upon getting the latest .json files. I can understand the case for not wanting this to be the default behavior, but without this, our entire dev team needs to be notified and perform the extra steps whenever a .json file change is checked in (fairly often).
Is there an environment setting in VS that impacts this, or a feasible workaround that anyone is aware of?
No, there is no such setting in VS IDE.
As you figured out that when you save any changes to the package.json or bower.json file, Visual Studio automatically install or restore all packages. However, the auto check is not triggered when you get file from TFS version control.
You can, however, create a licenser to license to the GettingEventHandler event. Once the event is triggered, run the scripts to install the updates:
npm install -g bower-check-updates
npm-check-updates -u
bower-check-updates -u
npm install
I think I'm just at the finish line for installing jekyll on windows, It's connecting fine, but I'm getting an error message:
Liquid exception: No such file or directory - python C:/Ruby193/lib/ruby/ms/1.9.1/gems/pygments.rb-0.6.3/lib/pygments/mentos.py in _posts/2015-06-09-welcome-to-jekyll.markdown<-[0m done.
Please add the following to your Gemfile to avoid polling for changes: gem 'wdm','>=0.1.0' if Gem.win_platform
I'm not sure what messages I can ignore and what I need to fix. What do you guys think?
If adding this to my gemfile is as simple as entering a cmd prompt, what do I need to enter to install it?
This was an issue that was addressed by me by another question a few days ago.This is the original question and my answer.
Basically the issue here is that you need to install Python to use Jekyll on Windows because the code highlighter Pygments is written in Python, hence requires Python to function. Pygments is alsothe default code highlighter currently. In the future versions of Jekyll will use the Rouge highlighter, which is written completely in Ruby. This issue is tracked on GitHub.
To solve your current problem, you just need to install Python 2.x, which the official linked guide from the Jekyll documentation provides very clear instructions there. You will also need to install pip. I have also included alternatives in the other SO answer I have given, so I will just provide you the link to it to reduce duplicate information and copy-paste.
Once you have Python 2.x and pip set up, and install pygments, your Jekyll install should be up and running with the site template!
Regarding the Gemfile
A summary of what a Gemfile is: A file that lists all the required Ruby gems for a particular program. For example, you wrote a ruby program that depends on 10 other gems, rather than ask the user of your new gem to go download the previous 10 gems, and then later wrestle with outdated gem issues, a Gemfile is used to keep track of what gems are needed and version. The Gemfile is used by Bundler, which is also a gem that automatically keeps track of what gems you need. In the case of Jekyll, you can use a Gemfile to dictate what you want added into your Jekyll install or removed. This is used by GitHub to keep local versions of Jekyll and other gems updated with the version used by Github Pages.
As for that notification, all you would need to do to avoid polling for changes is:
Open notepad or text editor of choice.
Add this line: gem 'wdm','>=0.1.0' if Gem.win_platform, just that line of text. You can later add gems by typing in gem 'nameOfGem in a separate line.
Save the file as Gemfile in your Jekyll site's folder. Notice that there is not .txt extension, which you can create a file with no extension in notepad by choosing 'All Files' instead of '.txt' under 'Save As'. Or, you could just edit the file extension to remove the .txt.
Install bundler by executing gem install bundler.
Run bundle install to update the gems. If you're using GitHub, add the Gemfile and the newly generated Gemfile.lock into git.
I'm following the instructions from here to build MonoDevelop on Mac OS X: Building MonoDevelop on OS X
I can build MonoDevelop just fine. I'd like to also build the MonoMac add in and use it.
The document says:
"To include addins from extras, manually copy their build directories
into the MonoDevelop.app directory, e.g.
cp -r ../../../extras/MonoDevelop.AspNet.Mvc/build/*
MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.AspNet.Mvc/"
However, I have no build directory under /extras/MonoDevelop.MonoMac.
I tried to follow this step to build extras:
"To include additional addins from extras in the build, instead of
using the Mac profile, use configure --select to select addins. This
will write the default profile. Next, replace the line in
profiles/default that begins with "main" with the one from
profiles/mac, then run configure again using the default profile."
But it does not give me the option to build the MonoMac extra.
Next, I try to compile the monodevelop.mdw. Again, I can build the main solution (MonoDevelop), but the extras fails with over 1000 errors.
Finally, I tried to take my existing monomac and macdev plugins and copy them into my master monodevelop.app bundle. But this breaks add solution/project dialog whenever I try to select a MonoMac project - it fails to load the Monodevelop.ide DLL.
Any advice on where I am going wrong would be appreciated.
I was not able to make this work following the directions on the MonoDevelop site. Even manually adding the extras/MonoDevelop.MonoMac extra to the profile did not work.
In the end, I build MonoDevelop from source, using the mac profile.
Then I got the latest MonoMac pieces, and build them from source. I used
make update
to install into my installed copy of MonoDevelop.
Then, I manually copied the following packages from my installed MonoDevelop to my newly compiled version from master:
MacPlatform.dll
MonoDevelop.iPhone
MonoDevelop.MacDev
MonoDevelop.MonoMac
Xamarin.Ide
Any everything now works :)
I'm trying to use Ruby with the MySQL that comes with MAMP, but there is a problem with the headers not being installed (or something like that).
Someone referred me to the tutorial copied below but I can't get it to work. When I put in the first line ./configure... it says no such directory.
1) One question in particular is, it says, "copy the MySQL source file (mysql-5.1.37.tar.gz) to somewhere on your hard drive." I don't know if by installing MAMP I have already done this step or not. If not, then I don't know what to do.
2) I also don't know what it means when it says "untar" the source file and "cd"...If MAMP is installed, has it been untarred already?
3) Also, do would I just open the terminal and start this code, or do I have to go into Mysql?
I wonder if anyone can tell me how to adapt it. Here are 2 other pieces of information about my installation that might be helpful.
a). MySQL is set up on port 8889 on my computer.
b) Also when I enter "which mysql" in the command line, it responds with "/usr/local/mysql/bin/mysql."
Please help if you can. Thanks.
Download the latest MAMP dmg file.
Download the 1.8.2 (or whichever the latest one you could find) components file from this page.
Unzip, mount the dmg, then copy the MySQL source file (mysql-5.1.37.tar.gz) to somewhere on your hard drive.
Untar the MySQL source file, and `cd` to the source file directory.
Compile the library:
$ ./configure --with-unix-socket-path=/Applications/MAMP/tmp/mysql/mysql.sock --without-server --prefix=/Applications/MAMP/Library
$ make -j2
Copy the compiled libraries into MAMP:
$ cp libmysql/.libs/*.dylib /Applications/MAMP/Library/lib/mysql
Copy the MYSQL headers into MAMP:
$ mkdir /Applications/MAMP/Library/include
$ cp -R include /Applications/MAMP/Library/include/mysql
Install the Ruby MySQL Gem, on Snow Leopard:
$ sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
On Leopard:
$ sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
Enjoy!
EDIT # 2009-11-23: If you’re still experiencing problems (perhaps with RVM), try adding “/Applications/MAMP/Library/bin/” to your $PATH in “~/.bash_profile”.
You should probably follow the tutorial in this link. It is updated for MAMP 1.9.5 with mysql2. A couple of changes have been made to the new MAMP version.
http://blog.mirotin.net/?p=35
Furthermore the tar file you need can be found at this link. Download the MAMP_components_1.9.5.dmg file.
http://sourceforge.net/projects/mamp/files/mamp/1.9.5/
Finally got through this with this blog post: http://newfangled.me/installing-mamp-and-rails-on-a-mac/
Here's the archived version of that incase it goes offline http://web.archive.org/web/20130728130916/http://newfangled.me/installing-mamp-and-rails-on-a-mac
The other answer's reference 404s for me. http://blog.mirotin.net/?p=35
I'd been struggling with this for a while myself.