i am having this annoying problem when deploying rails plugins. I can install them by downloading the source and putting it in the vendor/plugins directory, But i want to do it with the easy command line. I am trying to install the will_paginate plugin.
tried this command ruby script/plugin install git://github.com/mislav/will_paginate.git
that doesn't work, i tried this one as well ruby script/plugin install http://github.com/mislav/will_paginate.git
the problem i am getting is, There is no error while installing the plugin from command line, but rather there is an empty folder created inside vendor/plugins directory by the name of will_paginate, And the folder is empty. Any solutions for this?
thanks.
It sounds like you don't have git installed. Are you using Windows? If so, you'll have to download and configure a command-line git client.
If you do have git installed and configured correctly, alternatively, from your root rails directory you could try:
git clone git://github.com/mislav/will_paginate.git vendor/plugins/will_paginate
ruby script/plugin install git://github.com/mislav/will_paginate.git
That should work for you. For reference, here is the blog post from github. According to that post, this was supported beginning in Rails 2.0.2, so you'll need to be using at least that version of Rails and have git installed locally.
Related
I'm trying to initialize a new rails app on windows, and running rails new <appname> generates everything up to vendor/assets/stylesheets/.keep, but when bundle install is run, rails generates this error:
Checksum of /versions does not match the checksum provided by server! Something is wrong.
I'm not sure what's causing this, as I've done nothing to rails itself. Any help is appreciated.
Edit: If it's an error caused by windows being finicky, I have the option of moving to Linux, but I'd like to know what's wrong first.
I had the same issue using windows, and was able to solve it by uninstalling bundler and installing an older version.
rails new <appname>
gem uninstall bundler
gem install bundler -v 1.9
cd <appname>
bundle install
That did it for me!
In my case there was a *.pre.1 version and I chose to uninstall that particular version and then "bundle install" worked.
Try removing your ruby cache folder and then try again. So for example if you are on Linux machine and you are using rbenv and say ruby 2.1.5 folder. Your path would be similar to something like (Not sure where on windows ruby is stored):
~/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/cache/
Removing this folder and trying bundle install again should resolve the issue.
It will be great, if you move to a Linux machine.
On windows it's a hell to pay in my 5 years of experience what i have learned is not to mess with (ror) or (rs) in windows. here's a cheeky thing you can do an easy way. I believe you are using github as repo, as a editor you are using sublime if thats is a case open your gemfile you will see check the image or
try to clear cache on your server or update the gems.
I had this same exact error and solved it the following way. I think you are missing the ruby DevKit being installed.
Go here http://rubyinstaller.org/downloads/ and download/install the latest 32-bit Ruby version (as of writing this 2.2.4, you will need it for the web-console gem)
Make sure to add your ruby\bin folder to your environmental path variable
The trick is hidden near the bottom-left of the same page under the "Development Kit" section. You need to download and extract the right one into a permanent location (as of writing this for 32-bit - DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe)
After extracting the files, go into the main directory and run "ruby dk.rb init" followed by "ruby dk.rb install" (More information can be found here
That fixed it for me and i can now fully install with no checksum issues
This problem began when i tried to run my app. I wrote rails s and the console said me Could not find sdoc-0.4.1 in any of the sources Run bundle install to install missing gems. Then i wrote bundle install and the message that appeared was Checksum of /versions does not match the checksum provided by server! Something is wrong.
I solve this problem following this steps:
Wrote bundle install
The console said me Could not find sdoc-0.4.1 in any of the sources
Then i reinstalled this gem with gem install sdoc -v 0.4.1
I tried again to write rails s and it's was solved.
`
I want to make a gem from rails source code and install the gem.
After clone the master repository of rails, I tried as follow.
$>gem build rails.gemspec
$>gem install rails-4.2.0.alpha.gem
It did not work. I also tried $>rake install which did not work either.
Looking forward your help!
There is a script in the root directory which builds from source and installs the gems. It's called install.rb. You can use it by running the following:
ruby install.rb 4.2.0.alpha
Note: At the time of writing this the arel gem needs to be built from source and installed separately before running the install script above. This is because the version constraints in rails are requiring a version of arel which has not yet been released onto rubygems.org.
I found an example here showing how to install a Rails plugin. Their example shows this:
./script/plugin install calendar_helper
This won't work for me because, confusingly, I don't have anything called plugin in my script directory. All I have is rails:
$ ls script/
rails
So Rails doesn't come with the script you need to install plugins? You need a plugin to install plugins? That doesn't seem very likely. Is something wrong with my Rails project?
You're probably on Rails 3. Replace ./script/plugin with rails plugin.
rails plugin install calendar_helper
But the other problem is plugins, unlike gems, need to be installed with a full path. This was also true in Rails 2.x.
rails plugin install https://github.com/topfunky/calendar_helper.git
You should first input text like gem 'calendar_helper' in your Gemfile, and then run bundle install for rails 3.0
I ve been trying to install plugins from github to my RoR app for a while without success.
here is what i tried on my cmd (cmd using ruby, i have bitnami stack) in the root dir of the app:
ruby script/plugin install git://github.com/andre/geokit-rails.git
ruby script/plugin install http://github.com/andre/geokit-rails.git/
i keep getting:
Plugin not found ["git://github.com/andre/geokit-rails.git"]
i have msysgit installed and github account set with my public key, what do i need to do in msysgit to get this to work?
trying
script/plugin install git://github.com/andre/geokit-rails.git
or
./script/plugin install git://github.com/andre/geokit-rails.git
in msys.bat (not sure if i should type the command in the ruby cmd or the msysgit bash) in the app root dir gives me this:
/usr/bin/env: ruby: no such file or directory
i ve also tried replacing: stream.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null')
with: stream.reopen('NUL:')
in: \lib\ruby\gems\1.8\gems\activesupport-2.3.5\lib\active_support\core_ext\kernel\reporting.rb
i am a complete noob so i might be missing something very basic,
i hope someone will help cuz i ve been stuck with this for a whole day
which is not good at all for my deadline.
btw, i am using rails 2.3.5 with ruby 1.8.7 on winxp, bitnami stack.
cheers
You could try:
ruby script/plugin install git://github.com/andre/geokit-rails.git/
—Including the trailing slash. I'd found this suggestion in this article, especially the comments seem to contain plenty of interesting information.
finally it looks like it worked doing this:
in vendor/plugins
git clone git://github.com/andre/geokit-rails.git
i don t know if it ll have bad effects, i ll keep you updated.
(the solution was posted by Jhonson in here)
You can try like this:
Just download the zip file from github, extract it to a folder and copy that to your vendors/plugins folder.
I'm running Windows 7 32 bit. I just installed Ruby 1.9.2 and Rails 3.0.1. I set up my rails sample application and everything seems to be working fine. I tried installing the restful_authentication plugin from github and it's been a nightmare. I'm executing the following command:
rails plugin install -force git://github.com/technoweenie/restful-authentication.git
...and i get the get the following error:
Cannot install using checkout because this project is not under subversion.
How do i get around this? I've installed both the SVN and Git command-line clients and they're in my PATH.
Yep, you should not use this plugin with Rails 3. Use devise.
Get a linux or a mac for Rails development.
According to the installation notes you need to simply clone the project to the plugins dir.
git clone git://github.com/technoweenie/restful-authentication.git restful_authentication
As others have suggested, devise is a better option.