I installed middleman, but I still have v3.4.1 and not v4 as expected - middleman

I don't know if I am thinking right, but I couldn't find anything on the web regarding the installation of middleman v4.
I did the installation as explained on Middleman website : https://middlemanapp.com/basics/install/
And my Gemfile in my middleman folder is still showing
gem "middleman", "~>3.4.1"
Am I doing something wrong ?

The problem is that the ~> designation is preventing your app from installing any version of the Middleman gem that is higher that 3.5. Try changing that line to something like this:
gem "middleman", "~> 4.2"
After updating your Gemfile, you'll need to run bundle update middleman to update the Middleman gem.

Related

Bundler not updating when it says it has in rails 3.2

I am using the best_in_place gem. Unfortunately, the update code on the gem was not working properly but a solution had been found and merged into the latest alpha version of the gem. Initially I simply edited the gemfile and added the fix but I know that is bad practice so I added:
gem 'best_in_place', github: 'bernat/best_in_place'
to get the latest version. I bundle installed and it said this:
Using best_in_place (3.0.0.alpha) from git://github.com/bernat/best_in_place.git (at master)
But, when I go and look at the actual file it has not been changed.
Run bundle update best_in_place to update to the latest commit.

Installing barby barcode generation on ruby on rails

After using several non compatible barcode generators gems in rails 3.2, i am trying to use Barby. But i have no clue on how to install it. No idea if have to include in gemfile? or install as a plugin?
Readme provides no information about it nor the wiki.
Just for anyone still confuse about it, you can put them on Gemfile with gem 'barby' because the Gem was listed on Ruby Gems. Just saying.
Got it: gem install barby. This installs the gem, also its useful to install the wrapper has_barcode. I am currently looking how to use this, but went through install process.

problem in installation on acts_as_taggable_on_steroids as a gem

hi i am trying to use acts_as_taggable_on_steroids in my rails3 project, but it gives me error.Once i installed it as plugin but no improvement.
please give me steps to install it as gem in rails3 ,and it's usage.
You have to use it as a plugin to work, at least that way worked for me in Rails 3. Download the plugin and put in in /vendor/plugins folder in your project.

How to downgrade Rails version?

I create my rails application in version 3.0.7.
now i want to deploy my application, but the server is only support 3.0.3
how can i downloadgrade my application?
thanks
replace
gem 'rails','3.0.7'
with
gem 'rails', '3.0.3'
in your gemfile
Then run bundle
On a second note why not upgrade the server to rails 3.0.7?
Unless I'm mistaken... you can't. Well, you can, by:
Creating a new app
Bundle-installing all the necessary plugins, gems, etc
Copying over app files, configs, helpers, tests, everything
Running tests and seeing what doesn't now work
Making changes where required
Unfortunately, I don't believe there exists an easier way.

Why "bundle update" doesn't update the Gemfile to use Rails 3.0.5?

I tried using bundle update for a Rails 3.0.0 project I created, expecting all the content in Gemfile (and also Gemfile.lock) to reflect rails 3.0.5...
But it keep on being 3.0.0... even if I run bundle update rails, it still keep on being 3.0.0
Out of curiosity, I created a brand new Rails 3.0.0 project, and then run bundle update on it... and it still says "using rails 3.0.0", why? And how to make bundle update update to 3.0.5? (other than the obvious way to change the Gemfile by hand)
(I even tried changing sqlite3-ruby to sqlite3 in the Gemfile, because 3.0.5 seems to use sqlite3 instead. And rails and sqlite3 are the only 2 gems listed in Gemfile)
You already had the answer: change the gem version by hand and run bundle update rails.
I suspect you have gem 'rails', '3.0.0' in your Gemfile. Running bundle update rails won't change the version if you have the exact version specified.
Here's some info about the different ways of specifying gem versions in your Gemfile.
http://gembundler.com/rationale.html
Yeah you probably have
gem 'rails', '3.0.0'
change it to
gem 'rails', '~>3.0.0'
This will only upgrade minor versions of rails(3.0.5 & 3.0.6 ...). Or you can change it to
gem 'rails', '~>3.0'
if you want to upgrade to rails 3.1 but not 4.0
This is one of the top result when searching for "bundler wont update" on Google so I'm adding following as another answer. I was facing this issue in one of my projects.
In one of my projects I had a .bundle/config file which had following line:
BUNDLE_FROZEN: "1"
This was causing bundle update <gemname> to have no effect. I removed above line and it started updating again.