我不能让我的mysql从os x 10.7开始.它位于/usr/local/mysql/bin/mysql
当我输入mysql --version终端时,我找不到命令.
我试过这不能从命令行mac访问mysql但仍然找不到命令.我尝试用dmg安装mysql,我试图通过自制程序安装它,我无法让它工作.当我尝试用自制软件启动mysql时,我得到MySQL将无法启动
这是我的$PATH:
在/ usr/bin中:/ bin中:/ usr/sbin目录:/ sbin目录:在/ usr/local/bin目录:在/ usr/X11/bin中:在/ usr /本地/ git的/ bin中:/用户/维多利亚/斌:在/ usr /本地// USR /本地/ MySQL的/斌/私人的/ var/mysql的/私人的/ var/mysql的/ bin中
当我尝试在Ubuntu中启动Apache时,我收到此错误.
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
Run Code Online (Sandbox Code Playgroud)
我在ports.conf中有这个
NameVirtualHost *:80
Listen 80
Run Code Online (Sandbox Code Playgroud)
这是我的vhost文件
<VirtualHost *:80>
ServerAdmin example@example.com
ServerName rails.server.com
# ServerAlias
DocumentRoot /var/www/sample_app/current/public
ErrorLog /var/www/sample_app/error.log
RailsEnv production
<Directory "/var/www/sample_app/current/public">
Options Indexes FollowSymLinks MultiViews
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
我错过了什么?
我只是设置我的mac进行开发,并使用此精确的gemfile以前它工作正常.我不确定我做错了什么.
Victorias-MacBook-Pro:sample_app Victoria$ bundle --without production
/Users/Victoria/Sites/sample_app/Gemfile:38:in `evaluate': compile error
/Users/Victoria/Sites/sample_app/Gemfile:28: syntax error, unexpected ':', expecting kEND
gem 'cucumber-rails', '1.2.1', require: false
^ (SyntaxError)
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb:18:in `build'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:135:in `definition'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/cli.rb:220:in `install'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor/task.rb:22:in `send'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor/task.rb:22:in `run'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor.rb:263:in `dispatch'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor/base.rb:386:in `start'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/bin/bundle:13
/usr/bin/bundle:19:in `load'
/usr/bin/bundle:19
There was an error in your Gemfile, and Bundler cannot continue.
Run Code Online (Sandbox Code Playgroud)
这是gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'jquery-rails', '2.0.0'
gem 'bootstrap-sass', '2.0.0'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.5'
group …Run Code Online (Sandbox Code Playgroud) 当我尝试运行部署设置时,为什么会出现authenicationFailed?我使用ssh作为我的密码.我是否需要更改database.yml或deploy.rb中的任何内容.它们列在下面.
$ cap deploy:setup
* executing `deploy:setup'
* executing "sudo -p 'sudo password: ' mkdir -p /var/www/apps/sample_app /var/www/apps/sample_app
/releases /var/www/apps/sample_app/shared /var/www/apps/sample_app/shared/system /var/www
/apps/sample_app/shared/log /var/www/apps/sample_app/shared/pids"
servers: ["ec2-20-21-42-51.compute-1.amazonaws.com"]
Password:
connection failed for: ec2-20-21-42-51.compute-1.amazonaws.com
(Net::SSH::AuthenticationFailed: ubuntu)
Run Code Online (Sandbox Code Playgroud)
deploy.rb
# The name of your app
set :application, "sample_app"
# The directory on the EC2 node that will be deployed to
set :deploy_to, "/var/www/apps/#{application}"
set :keep_releases, 3
# deploy with git
set :scm, :git
set :repository, "git@github.com:username/sample_app.git"
set :git_shallow_clone, 1
set :branch, "master"
set :use_sudo, true …Run Code Online (Sandbox Code Playgroud) 我正进入(状态
cannot load such file -- bootstrap/sass
Run Code Online (Sandbox Code Playgroud)
我已经安装了bootstrap-sass-2.0.3.1,sass-3.1.18,sass-rails-3.2.5,coffee-rails-3.2.2和uglifier-1.2.4
为什么我会收到此错误?
它默认为Mac OS x附带的1.8.7.我试图使用RVM并使用1.9.3我试过rvm使用默认值并且说-bash:rvm:command not found
我的bashrc文件有
PATH=$PATH:$HOME/.rvm/bin
Run Code Online (Sandbox Code Playgroud) 我是c ++的新手,我正在尝试从值50开始增加汽车,但如果youdamage比greamage更好,那么只增加一个.我希望汽车在下一次循环时保持其价值.我希望这是有道理的.
int Power (int &car);
int main(){
int car = 50;
// ...
// ...
// ...
int carDamage = 0;
int yourDamage = 0;
// pick a random number between 1 to 50
yourDamage = 0 + rand() % (50 - 0 + 1);
carDamage = 0 + rand() % (50 - 0 + 1);
cout << "You hit the car and cause damage of: " << carDamage << endl;
cout << "The car hits you and causes …Run Code Online (Sandbox Code Playgroud) 如何在测试时更改Sublime使用的Ruby版本.它目前使用1.8,但我希望它使用1.9.3,它在RVM中设置为我的默认值.当我键入哪个ruby时,我得到1.9.3,但是Sublime没有使用它.
我正在收到页面"我们很抱歉,但是当我尝试加载我的rails应用程序时出现了问题.当我运行时
tail -f log/production.log
Run Code Online (Sandbox Code Playgroud)
我明白了
ActionView::Template::Error (rails.png isn't precompiled)
Run Code Online (Sandbox Code Playgroud)
我跑了
RAILS_ENV=production rake assets:precompile
Run Code Online (Sandbox Code Playgroud)
从当前目录.
我究竟做错了什么?我认为我的所有目标都是正确的.我收到此错误
describe "visiting the edit page" do
describe "submitting to the update action" do
describe "visiting the user index" do
describe "as wrong user" do
FactoryGirl.create(:user, email: "wrong@example.com")}
Run Code Online (Sandbox Code Playgroud)
和
describe "visiting Users#edit page" do
Run Code Online (Sandbox Code Playgroud)
这是我运行rspec时遇到的错误
syntax error, unexpected tIDENTIFIER, expecting keyword_end
describe "authorization" do
describe "for non-signed-in users" do
let(:user) {FactoryGirl.create(:user)}
describe "when attempting to visit a protected page" do
before do
visit edit_user_path(user)
fill_in "Email", with: user.email
fill_in "Password", with: user.password
click_button "Sign in"
end
describe "after signing in" …Run Code Online (Sandbox Code Playgroud) ubuntu-11.10 ×2
apache ×1
c++ ×1
capistrano ×1
gem ×1
loops ×1
mysql ×1
precompile ×1
rspec ×1
sublimetext2 ×1