Have tried to run rails console but when I try to run a simple command like:
"foobar".length
I get a "Command not found" error. IRB runs fine.
Do I need to download a gem and do a bundle install to run rails console? If so, what gem?
Am running Rails 3.0.9
Seems like your rails console didn't actually start properly but tried to start and killed itself because of some error. The error you receive sound more like it's coming from your shell (e.g. bash).
Try to start your console with bundle exec rails console. If there are errors, please post them here.
Related
I'm getting an error when generating shopify app using rails. Screenshot is shown below:
Can anyone tell me what is going wrong?
You have probably added the shopify gem to the gems file.
all you need to do is to run
bundle install
so the app will install and use the new gem
First time I've seen this error when running a migration on Heroku.
heroku rake db:migrate --app myapp
(in /app)
New Relic Agent not running.
I have the New Relic addon in my app addons so would this be an issue with the heroku platform or my app?
edit: App is running on the bamboo-ree-1.8.7 stack.
The answer is that Heroku is telling you that the New Relic Agent is not running in that environment when you run rake, however rake db:migrate is still working, so actually everything is working as it should.
Simply run your rake db:migrate, ignore the New Relic message, then heroku restart and everything should be working just fine.
Seems this was a simple fix. The new relic addon on Heroku stopped working and simply required me to remove and add it back to my application.
I'm using Rails v. 3.0.9 and have pushed the app to Heroku. When I view the custom Heroku domain I get the following message from Heroku:
"We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly."
I run heroku logs and don't seem to get any error messages. The only error I encounter with Heroku seems to be when I run heroku rake db:migrate with which I get the following in return:
rake aborted!
uninitialized constant Rake::DSL
Note: I'm new to Rails and to Heroku. I'm not quite understanding the difference between production and development environments. Do I need to be in production for Heroku to work? At the moment, I'm using localhost3000 to view my app. Thanks guys!
I have a blog post about it here:
http://codeglot.com/posts/13-you_have_already_activated_rake_0_9_2
There are two solutions. Use an older version of rake or require DSL.
I've been working on a on uploading my RoR3 website onto Heroku.
Took me a while to get it up. Seems to work pretty good but when i try creating a project (my website manges donation projects) i get the next message:
We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly.
No idea what causes this it works fine on my localhost.
The normal Rails Error - Have a look at the Heroku Logs and check the Stack for more details then post them back on here.
Usually when I've had this problem, it's because I've forgotten to run db migrations at Heroku.
In terminal, in your rails app folder, run this:
heroku rake db:migrate
If needed, you can find more info in this thread.
I'm working with Alex Reisner's geocoder gem on a Rails 3 app (3.0.3) because I'm concerned about GeoKit's shakey Rails 3 compatibility. Alex's gem looked perfect for my application so I started using it and had it working flawlessly last night on my Macbook. I pushed the app to Github when I got it running.
Today, I did a git clone of the app on a desktop Mac. Same version of Ruby, Rails and identical source and Gemfile. This time geocoder is throwing this exception:
NameError (uninitialized constant Geocoder::Net):
app/controllers/restaurants_controller.rb:16:in `create'
My models use after_validation :fetch_coordinates to geocode the model upon save.
Has anyone noticed any other dependencies outside the bundle that could cause this? I like the way Alex put this one together but may give geokit-rails3 a try even though it's an unfinished port.
I just released gem version 0.9.7 which should solve this problem.