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.
Related
So I'm new to Ruby and also to Rails. I have recently installed Ruby on Arch Linux.
It was mostly all fine any happy except for a few errors here and there but now when I try initializing a new rails app using rails new AppName I get the error
bash: /home/[username]/.gem/ruby/2.3.0/bin/rails: No such file or directory
I've tried creating a file and directory called rails in but get more errors.
reinstalling rails same outcome
reinstalling ruby same outcome
following any other dependencies at install also leads no wear.
Ask for any info you may need.
Thanks in advance
UPDATE
installing of gems is now stopped by a common error
$ gem install rails
Building native extensions. This could take a while...
ERROR: While executing gem ... (Errno::EACCES)
Permission denied # rb_sysopen - /usr/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.6.8/gem_make.out
and the same when I try install nokogiri
ok first check that you installed both ruby and rails well
ruby -v
and
rails -v
so if you get a respond to that you're all good
go to the place you want to create your folder att
rails new appname
then
cd appname
if that doesn't work try to generate anything
rails generate controller appname
if the generate works then your rails is ok if not then you might want to add the rails to your environment variable path.
You installed ruby on your computer. However the path is not recognized yet on it. To add it you can do this . if you are using windows my computer right click and then chose advanced system settings -> advanced at the bottom environment variables system variables PATH and then add the the path to your ruby bin folder. I am sorry i don't have enough reputation so can't add pictures but reading this will solve your problem
The overall problem is a lack of permissions to /usr/lib/ruby/. This can be fixed with
sudo chmod 777 /usr/lib/ruby
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.
`
Why is setting up ruby on rails in ubuntu (for a ubuntu beginner) like getting a root canal at the dentist's office?
First of all downloading ruby, rubygems and rails itself takes forever with so many commands... Then, apparently there's already Ruby 1.8.7 in ubuntu - and when I try to install ruby 1.9.2 (for rails 3) it goes somewhere else... and rails doesn't see the new ruby...
Ugg...
Ryan Bigg has an excellent post about this using RVM. For setting up rails, you generally want to avoid installation via aptitude.
http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you
I had to (not sure if this is standard), Download rails/ruby offline and link it to my bin folder before everything was good, I also had to go remove all the old stuff ubuntu flung at me. Quite painful I wish ubuntu would just update the repositories to point to the 1.9.2.
I agree about the root canal feeling. I wrote a script that does the setup for me. You can find it here: https://github.com/sleepycat/wrong-side-of-the-tracks
Suggestions, bug fixes and improvements welcome.
$ sudo apt-get install ruby1.9.1-full rubygems1.9.1 # this is really 1.9.2 despite the confusing name
$ export PATH=/var/lib/gems/1.9.1/bin:$PATH # add this to your ~/.bashrc too
$ sudo gem1.9.1 install rails
$ rails new foo_project
enjoy.
I'm using Ubuntu 10.04. In the terminal, when I go to my app and type (without using the "ruby" in front):
script/generate controller recipes
I get a "Permission denied" error. When I use this however:
ruby script/generate controller recipes
everything works as expected. Is there something I have to do to Ubuntu to make the prepended "ruby" unnecessary when I'm trying to generate controllers (i.e. just using "script/generate controller recipes" should just work)?
chmod 755 script/generate
Type
ls -la
in the script folder to see the permissions of the generated script.
It probably doesn't have the execute permission (x).
I recommend reinstalling rails.
wow, that's strange,
congrats on switching to linux.
how did you install Ruby? Did you do it from the synaptic package manager? Did you run sudo aptitude install ruby or something like that?
whatever you have done, you might be best installing RubyVersionManager (RVM) - it's really easy - there's a railscast on how it works here: http://railscasts.com/episodes/200-rails-3-beta-and-rvm
I've never had or heard of the problem you've got there
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.