Problem with installing rails-3 plugins (Win7) - ruby-on-rails-3

I'm newbie at ruby, I spent couple hours trying to find the way to install the plugin... but without any success, so here I am, very frustrated... please help.
OS: W7
ruby: ruby 1.9.2
rails: 3.0.5
msysgit: 1.7.4 (i did not any changes, just installation)
(is there anything else I should of mentioned?)
ruby script/plugin install git://github.com/thoughtbot/paperclip.git/
C:\Ruby\Ruby192\bin\ruby.exe: Permission denied -- script/plugin (LoadError)
Thank you!

The script/plugin command (and all other script/<exec> commands) is no longer used in Rails 3, instead you should do:
rails plugin install git://github.com/thoughtbot/paperclip.git

Related

(can't activate mysql2 (~> 0.3.10), already activated mysql2-0.5.4. Make sure all dependencies are added to Gemfile.)

Ubuntu 20.04
Rails 3.2.22.5
Ruby 2.3.7
mysql2 8.0.29
Above are the versions that currently i'm using for my project(app).
In Gemfile mysql2 version is 0.3.18 but this version throwing me errors and not allowing me to run complete bundle.
But, when i'm trying to run bundle with different version of mysql2 gem like 0.5.4, bundle successfully running but after that when i try to create db(database) or to start server this above error mentioned in question appears.
Anyone please help me out in this regard if you guys have any idea about that.
Thanks in advance

I tried to install Rails 4 gem y my CPanel and didnt work

I have almost finished my first Ruby on Rails application, i have used Ruby 2.1.2 and Rails 4.2.4.. then i want to deploy it, the hosting i took gave me 1month trial but they have installed CPanel 11 (it has rails 2.3.18 by default)
but when i try to install the rails 4.2.4 gem it gives me this:
> Error installing rails: i18n requires Ruby version >= 1.9.3.
My questions are:
Is there a way to update the ruby?
Would i have any trouble if they just update to 1.9.3 when i have used 2.1.2?
this is a screenshot from the gems in the cpanel
Recently I had to upgrade my Ruby version to a higher one and I was in a very similar situation like yours.
I used rvm for this.
Use rvm for listing the ruby version with the following command:
rvm list known
Then upgrade ruby with: rvm install version_of_your_choice
Also, search the internet for tutorials. StackOverflow has all the answers.

Passenger throws Bundler::GemfileError after "gem update --system"

Background
On my local machine, I tried installing the 'bullet' gem via my gemfile, and bundle seemed to go without incident, however upon restarting my app passenger began throwing the error Invalid gemspec for uniform_notifier. It seems someone else had this issue and the suggested resolution on StackOverflow said to update RubyGems by running:
The issue
gem update --system
This produced no error messages upon running, however now none of apps will start. They all give the same vague Passenger error:
PhusionPassenger::UnknownError
There was an error in your Gemfile, and Bundler cannot continue. (Bundler::GemfileError)
I removed 'bullet' from my gemfile so it's now back in a state when it was working yesterday, so I don't think there can be an error in my gemfile. Furthermore, all of my other apps are now broken and their gemfiles haven't changed at all.
For reference:
ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.5.0]
rails -v
Rails 3.2.6
rvm --version
rvm 1.1.4 by Wayne E. Seguin
And when I do gem list for the global and local gemsets, it shows bundler 1.1.0 installed.
Edit: I should also mention that running rails s starts up a WEBrick server just fine and I can access my apps at localhost:3000, so it's only under Passenger that this error crops up.
Have you committed your Gemfile.lock?
I was able to fix this by rolling back rubygems-update to the previously installed version by running
gem update --system 1.8.11
At which point all of my apps began working again. I'm still not sure what the problem was, and will gladly switch the accepted answer from my own to someone who can provide more insight into why updating rubygems-update would break Passenger integration.
I wish someone from Phusion Passenger would give a definitive answer but just wanted to say that I've experienced the same thing. Updating rubygems has broken passenger-nginx integration for us and requires recompiling the passenger-nginx module. Not sure why this would be. My speculation is that the module is somehow compiled with a hard reference to a specific version of rubygems.

Installed RVM and now my rails server won't start

I had started the Rails app yesterday and got everything working.
Then today I decided to go with RVM, as I realized I might have need of it. So I uninstalled all gems, installed RVM and have now a working(?) RVM.
I reinstalled the gems and now my bundle exec rails server crashes
$ bundle exec rails server
[BUG] cross-thread violation on rb_gc()
(null)
Abort trap: 6
Crashreport
I have no idea whats wrong with my installation, as there is no reasonable error' which I could understand. :(
Edit: Gemfile
Try adding gcc-4.2 as your default C compiler to your bash profile:
export CC=/usr/bin/gcc-4.2
Then reinstall your rubies. You need XCode 4.1 to be installed before 4.2, otherwise you won't have gcc-4.2. The easiest way is to uninstall 4.2, and then install 4.1, then upgrade to 4.2.
Check out this solution: Error: cross-thread violation on rb_gc()
It looks like this might be an issue with a ruby version difference between your system and RVM. There are a few other articles out there on how to clean this up, like the one below, but I'm not sure which one will work for you:
http://blog.ubrio.us/nix/osx-rubygems-and-cross-thread-violations-in-rb_gc/
Great, the answer was to use ruby 1.9.3 instead of 1.9.2 ...

Git, RVM, Ruby and Rails on OSX Tiger

I have an old laptop which runs OSX 10.4 Tiger where I'd like to run git, rvm, Ruby 1.9.2 and Rails 3.1.
At the moment I have git installed (using MacPorts), but rvm seems to require a newer version of bash. This I realized because the install script complains and I googled the error. Anyhow, I installed a newer bash with MacPorts and that helped me with getting rvm installed. However, it of course didn't replace the default bash version on the system and all rvm scripts point to the system one. This simply results in failures when I try to run any rvm commands.
Before I totally mess up the system I'd like to know does anyone have git, rvm, Ruby 1.9.2 and Rails 3.1 installed on OSX 10.4 Tiger? How did you install each part and what versions do you use?
Thanks for all help!
I never got this to work, but I decided to upgrade to OSX Snow Leopard. After this it was very easy to get things set up. This is what I recommend.