I have a Rails app I am trying to test in Jruby on Engineyard. I can get it locally working when i switch ruby version in rvm to 1.9.2 (jruby) However when on engineyard a deploy fails:
syntax error, unexpected ':'
I solved this error locally using 1.9.2 export JRUBY_OPTS=--1.9 I have tried this on engineayrd but i am still getting the same error.
Does anyone know how to set EngineYard to default to 1.9.2 not ruby-1.8.7-p330?
Any help is greatly appreciate
Try putting the following in /home/deploy/.jrubyrc:
compat.version=1.9
Related
It's supposed that I installed Ruby on Rails using RailsInstaller (Windows), but when I try to use the command:
rails -v
The command prompt shows something like:
"System can not find the specified path."
I've uninstalled Rails with 'gem' command and reinstall it, but error still alive.
Is there another way to install Ruby on Rails?
How can I solve this problem?
NOTE: Ruby\bin is in PATH variable.
I found a solution: installing the previous version of RailsInstaller.
I was trying to use: railsinstaller-3.2.0 (Ruby 2.2.4, Rails 4.2)
It worked good with: railsinstaller-3.1.1 (Ruby 2.1.8, Rails 4.2)
NOTE: I'm using W7 OS.
Check out the answer on this one. You have to add rails to path.
Installing Ruby on Rails on windows
So I'm a rails developer familiar with Rails 3 and 4. I'm taking on a Rails 1.1.2 project, and the first problem I'm having is getting the server running.
I'd really love some help figuring out what I'm missing setting up the environment. When I run script/server, I get:
-bash: script/server: /Users/michael/.rvm/gems/ruby-1.9.3-p545: bad interpreter: Permission denied
This is after noting that at the top of the script/server file, there's an opportunity to define the location of the ruby install with a ruby comment:
#!/Users/michael/.rvm/gems/ruby-1.9.3-p545
At least, this is how I understand it. What should this comment point to? Does this look correct? I've installed ruby 1.9.3 using rvm and installed rails V 1.1.2 through sudo gem install rails. Everything seemed to work fine.
Is this some kind of bash permissions issue? I really don't understand what's going on. Any help would be appreciated!
I believe a rails project that old will require Ruby 1.8.7, so you should start with an older version of Ruby just to be sure. Once you get it running with the older ruby version, you can try 1.9 again, but trying it with 1.8.7 should help you out a bit. Your shebang should be able to do this though:
#!/usr/bin/env ruby
It needs the path of the ruby interpreter, which can be obtained dynamically via the above line.
After upgrading a Rails application to use Ruby 2.0.0 (from 1.9.3), I started receiving this error when attempting to deploy to Heroku via rake <stage> deploy.
Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0 (Bundler::RubyVersionMismatch)
It also seems to cause this error, (but I can run the Heroku commands manually without the heroku_san helpers, so authorization is not the issue).
Expected(200) <=> Actual(401 Unauthorized)
I updated the gems to the latest version, and also updated the Heroku Toolbelt.
I found this pull request and patched my version, but the error persisted.
How do I solve this (on both Ubuntu & OSX)?
Other info:
Ubuntu 12.04 LTS x64
Rails 3.2.13
Ruby 2.0.0-p247
heroku-api-0.3.15
heroku_san-4.0.8
heroku-toolbelt/2.41.0 (x86_64-linux)
rvm 1.22.10
The solution for me on Ubuntu was to modify
/usr/local/heroku/bin/heroku
And change the shebang line to
#!/usr/bin/env ruby
Thanks goes to Pivotal Labs for this.
(I don't use a Mac.)
Another issue I found with this error (1.9.2 not 1.9.3) is having BUNDLE_GEMFILE env variable set on heroku which causes heroku ruby build pack to freak and default to 1.9.2.
after I deploy with capistrano to a new server I see:
/shared/bundle/ruby/1.9.1/gems/
I don't even have ruby 1.9.1 installed on the server. and if i run: ruby -v
it returns 1.9.3
but in all of capisrtano actions i keep seeing 1.9.1
why is that? and how can i stop it?
thanks
Don't worry. Ruby 1.9.1 to 1.9.3 is using that path by default. It doesn't necessarily mean you are using the wrong Ruby.
i get this passenger error.
Full error page: https://dl.dropbox.com/u/1725428/stackoverflow/Mongoid-Errors-InvalidDatabase.html
My setup is:
- Mac OSX Lion
- rvm ruby v1.9.3p194
- passenger
- mongodb local server
- rails 3.1.1
- mongoid 2.4.10
This setup worked well, until i tried changing a Rails version in Gemfile from 3.1.1 to 3.2. Then it broke up with "Database should be a Mongo::DB, not String. (Mongoid::Errors::InvalidDatabase)"
Tried to use previous rails 3.1.1., but the error persisted.
Tried to reinstall rvm and all the gems. But this still occur.
Tried to use the latest mongoid instead of previous working 2.4.5, not helping though.
Database server is running.
Any ideas on what could cause this?
Okay, so it was bug in the mongoid gem, i used the current 3.0rc right from github and it is working.
https://github.com/mongoid/mongoid.git